home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / AOCE / Development Tools / Sample Code / Digital Signatures / Digital Signature Demo / Using Digital Signature Demo < prev   
MacBinary  |  1993-11-07  |  60.6 KB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Sun Nov 7 03:08:25 1993, modified Sun Nov 7 03:08:27 1993, creator 'HLX2', type 'ONLN', 59652 bytes "Using Digital Signature Demo" , at 0xe984 2175 bytes resource default (weak)
99% file data default
66% TrID SpeedScript document (C64) default (weak)
33% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 1c 55 73 69 6e 67 20 | 44 69 67 69 74 61 6c 20 |..Using |Digital |
|00000010| 53 69 67 6e 61 74 75 72 | 65 20 44 65 6d 6f 00 00 |Signatur|e Demo..|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 00 e9 04 00 | 00 08 7f a9 02 5d 79 a9 |........|.....]y.|
|00000060| 02 5d 7b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.]{.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 bc e7 00 00 |........|........|
|00000080| 44 69 67 69 74 61 6c 20 | 53 69 67 6e 61 74 75 72 |Digital |Signatur|
|00000090| 65 20 44 65 6d 6f 0d 4d | 61 72 74 69 6e 20 4d 69 |e Demo.M|artin Mi|
|000000a0| 6e 6f 77 0d 44 65 76 65 | 6c 6f 70 65 72 20 54 65 |now.Deve|loper Te|
|000000b0| 63 68 6e 69 63 61 6c 20 | 53 75 70 70 6f 72 74 0d |chnical |Support.|
|000000c0| 49 6e 74 72 6f 64 75 63 | 74 69 6f 6e 0d 54 68 65 |Introduc|tion.The|
|000000d0| 20 44 69 67 69 74 61 6c | 20 53 69 67 6e 61 74 75 | Digital| Signatu|
|000000e0| 72 65 20 44 65 6d 6f 20 | 69 6c 6c 75 73 74 72 61 |re Demo |illustra|
|000000f0| 74 65 73 20 68 6f 77 20 | 41 4f 43 45 20 44 69 67 |tes how |AOCE Dig|
|00000100| 69 74 61 6c 20 53 69 67 | 6e 61 74 75 72 65 20 74 |ital Sig|nature t|
|00000110| 65 63 68 6e 6f 6c 6f 67 | 79 20 6d 61 79 20 62 65 |echnolog|y may be|
|00000120| 20 69 6e 63 6f 72 70 6f | 72 61 74 65 64 20 69 6e | incorpo|rated in|
|00000130| 74 6f 20 61 6e 20 65 78 | 69 73 74 69 6e 67 20 61 |to an ex|isting a|
|00000140| 70 70 6c 69 63 61 74 69 | 6f 6e 20 77 69 74 68 20 |pplicati|on with |
|00000150| 61 20 6d 69 6e 69 6d 75 | 6d 20 6f 66 20 66 75 73 |a minimu|m of fus|
|00000160| 73 2c 20 61 6e 64 20 77 | 69 74 68 6f 75 74 20 73 |s, and w|ithout s|
|00000170| 69 67 6e 69 66 69 63 61 | 6e 74 6c 79 20 70 65 72 |ignifica|ntly per|
|00000180| 74 75 72 62 61 74 69 6f | 6e 20 6f 66 20 74 68 65 |turbatio|n of the|
|00000190| 20 65 78 69 73 74 69 6e | 67 20 61 70 70 6c 69 63 | existin|g applic|
|000001a0| 61 74 69 6f 6e 2e 0d 54 | 68 65 20 64 65 6d 6f 20 |ation..T|he demo |
|000001b0| 65 78 74 65 6e 64 73 20 | 74 68 65 20 54 68 69 6e |extends |the Thin|
|000001c0| 6b 20 43 6c 61 73 73 20 | 4c 69 62 72 61 72 79 20 |k Class |Library |
|000001d0| d2 54 69 6e 79 20 45 64 | 69 74 d3 20 73 61 6d 70 |.Tiny Ed|it. samp|
|000001e0| 6c 65 20 70 72 6f 67 72 | 61 6d 2c 20 61 6c 6c 6f |le progr|am, allo|
|000001f0| 77 69 6e 67 20 64 6f 63 | 75 6d 65 6e 74 73 20 63 |wing doc|uments c|
|00000200| 72 65 61 74 65 64 20 62 | 79 20 54 69 6e 79 45 64 |reated b|y TinyEd|
|00000210| 69 74 20 74 6f 20 62 65 | 20 d2 73 69 67 6e 65 64 |it to be| .signed|
|00000220| d3 20 61 6e 64 20 d2 76 | 65 72 69 66 69 65 64 d3 |. and .v|erified.|
|00000230| 20 62 79 20 74 68 65 20 | 44 69 67 69 74 61 6c 20 | by the |Digital |
|00000240| 53 69 67 6e 61 74 75 72 | 65 20 4d 61 6e 61 67 65 |Signatur|e Manage|
|00000250| 72 2e 20 49 74 20 61 6c | 73 6f 20 73 68 6f 77 73 |r. It al|so shows|
|00000260| 20 68 6f 77 20 44 69 67 | 69 74 61 6c 20 53 69 67 | how Dig|ital Sig|
|00000270| 6e 61 74 75 72 65 73 20 | 6d 61 79 20 62 65 20 61 |natures |may be a|
|00000280| 70 70 6c 69 65 64 20 74 | 6f 20 61 70 70 6c 69 63 |pplied t|o applic|
|00000290| 61 74 69 6f 6e 20 64 61 | 74 61 2c 20 73 75 63 68 |ation da|ta, such|
|000002a0| 20 61 73 20 74 68 65 20 | 73 74 61 74 65 20 6f 66 | as the |state of|
|000002b0| 20 63 68 65 63 6b 62 6f | 78 65 73 20 61 6e 64 20 | checkbo|xes and |
|000002c0| 72 61 64 69 6f 20 62 75 | 74 74 6f 6e 73 2e 0d 41 |radio bu|ttons..A|
|000002d0| 6c 74 68 6f 75 67 68 20 | 74 68 65 20 63 6c 61 73 |lthough |the clas|
|000002e0| 73 20 69 73 20 64 65 66 | 69 6e 65 64 20 66 6f 72 |s is def|ined for|
|000002f0| 2c 20 61 6e 64 20 6f 70 | 65 72 61 74 65 73 20 77 |, and op|erates w|
|00000300| 69 74 68 69 6e 20 74 68 | 65 20 54 68 69 6e 6b 20 |ithin th|e Think |
|00000310| 43 6c 61 73 73 20 4c 69 | 62 72 61 72 79 20 6f 72 |Class Li|brary or|
|00000320| 67 61 6e 69 7a 61 74 69 | 6f 6e 61 6c 20 73 74 72 |ganizati|onal str|
|00000330| 75 63 74 75 72 65 2c 20 | 69 74 20 73 68 6f 75 6c |ucture, |it shoul|
|00000340| 64 20 62 65 20 72 65 6c | 61 74 69 76 65 6c 79 20 |d be rel|atively |
|00000350| 65 61 73 79 20 74 6f 20 | 61 64 61 70 74 20 69 74 |easy to |adapt it|
|00000360| 20 74 6f 20 6f 74 68 65 | 72 20 63 6c 61 73 73 20 | to othe|r class |
|00000370| 68 69 65 72 61 72 63 68 | 69 65 73 2e 20 45 76 65 |hierarch|ies. Eve|
|00000380| 6e 20 69 66 20 79 6f 75 | 20 64 6f 20 6e 6f 74 20 |n if you| do not |
|00000390| 75 73 65 20 61 20 63 6c | 61 73 73 20 6c 69 62 72 |use a cl|ass libr|
|000003a0| 61 72 79 20 64 65 73 69 | 67 6e 20 69 6e 20 79 6f |ary desi|gn in yo|
|000003b0| 75 72 20 6f 77 6e 20 61 | 70 70 6c 69 63 61 74 69 |ur own a|pplicati|
|000003c0| 6f 6e 73 2c 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |ons, you| should |
|000003d0| 73 74 69 6c 6c 20 62 65 | 20 61 62 6c 65 20 74 6f |still be| able to|
|000003e0| 20 75 73 65 20 74 68 65 | 20 64 65 6d 6f 20 61 73 | use the| demo as|
|000003f0| 20 61 20 62 61 73 69 73 | 20 66 6f 72 20 79 6f 75 | a basis| for you|
|00000400| 72 20 6f 77 6e 20 44 69 | 67 69 74 61 6c 20 53 69 |r own Di|gital Si|
|00000410| 67 6e 61 74 75 72 65 20 | 73 75 62 72 6f 75 74 69 |gnature |subrouti|
|00000420| 6e 65 20 6c 69 62 72 61 | 72 79 2e 0d 43 6c 61 73 |ne libra|ry..Clas|
|00000430| 73 20 48 69 65 72 61 72 | 63 68 79 0d 54 68 65 20 |s Hierar|chy.The |
|00000440| 64 65 6d 6f 20 64 65 66 | 69 6e 65 73 20 61 20 43 |demo def|ines a C|
|00000450| 53 69 67 6e 61 74 75 72 | 65 20 63 6c 61 73 73 20 |Signatur|e class |
|00000460| 61 6e 64 20 74 77 6f 20 | 73 75 62 63 6c 61 73 73 |and two |subclass|
|00000470| 65 73 20 74 68 61 74 20 | 61 72 65 20 75 73 65 64 |es that |are used|
|00000480| 20 74 6f 20 6d 61 6e 69 | 70 75 6c 61 74 65 20 64 | to mani|pulate d|
|00000490| 69 67 69 74 61 6c 20 73 | 69 67 6e 61 74 75 72 65 |igital s|ignature|
|000004a0| 73 2e 20 49 74 20 61 6c | 73 6f 20 61 64 64 73 20 |s. It al|so adds |
|000004b0| 61 20 66 65 77 20 73 69 | 6d 70 6c 65 20 63 6c 61 |a few si|mple cla|
|000004c0| 73 73 65 73 20 74 68 61 | 74 20 61 64 64 20 74 68 |sses tha|t add th|
|000004d0| 65 20 6e 65 63 65 73 73 | 61 72 79 20 63 61 70 61 |e necess|ary capa|
|000004e0| 62 69 6c 69 74 69 65 73 | 20 74 6f 20 54 69 6e 79 |bilities| to Tiny|
|000004f0| 45 64 69 74 2e 20 54 68 | 65 20 63 6c 61 73 73 20 |Edit. Th|e class |
|00000500| 68 69 65 72 61 72 63 68 | 79 20 69 73 20 61 73 20 |hierarch|y is as |
|00000510| 66 6f 6c 6c 6f 77 73 3a | 0d 43 6c 61 73 73 09 09 |follows:|.Class..|
|00000520| 44 65 73 63 72 69 70 74 | 69 6f 6e 09 0d 43 53 69 |Descript|ion..CSi|
|00000530| 67 6e 61 74 75 72 65 09 | 09 54 68 65 20 62 61 73 |gnature.|.The bas|
|00000540| 65 20 63 6c 61 73 73 20 | 66 6f 72 20 44 69 67 69 |e class |for Digi|
|00000550| 74 61 6c 20 53 69 67 6e | 61 74 75 72 65 73 2e 20 |tal Sign|atures. |
|00000560| 43 53 69 67 6e 61 74 75 | 72 65 20 69 73 20 61 20 |CSignatu|re is a |
|00000570| 73 75 62 63 6c 61 73 73 | 20 74 6f 20 74 68 65 20 |subclass| to the |
|00000580| 62 61 73 65 2d 63 6c 61 | 73 73 2c 20 43 4f 62 6a |base-cla|ss, CObj|
|00000590| 65 63 74 2e 20 41 70 70 | 6c 69 63 61 74 69 6f 6e |ect. App|lication|
|000005a0| 73 20 6e 6f 72 6d 61 6c | 6c 79 20 64 6f 20 6e 6f |s normal|ly do no|
|000005b0| 74 20 63 72 65 61 74 65 | 20 69 6e 73 74 61 6e 63 |t create| instanc|
|000005c0| 65 73 20 6f 66 20 74 68 | 69 73 20 63 6c 61 73 73 |es of th|is class|
|000005d0| 2c 20 62 75 74 20 72 61 | 74 68 65 72 20 75 73 65 |, but ra|ther use|
|000005e0| 20 73 75 62 63 6c 61 73 | 73 65 73 2e 09 0d 09 43 | subclas|ses....C|
|000005f0| 53 69 67 6e 65 64 44 61 | 74 61 46 69 6c 65 09 54 |SignedDa|taFile.T|
|00000600| 68 69 73 20 63 6c 61 73 | 73 20 61 6c 6c 6f 77 73 |his clas|s allows|
|00000610| 20 73 69 67 6e 69 6e 67 | 20 6f 72 20 76 65 72 69 | signing| or veri|
|00000620| 66 79 69 6e 67 20 61 6e | 20 65 6e 74 69 72 65 20 |fying an| entire |
|00000630| 66 69 6c 65 2e 20 49 74 | 20 69 73 20 75 73 65 64 |file. It| is used|
|00000640| 20 74 6f 20 73 69 67 6e | 20 61 20 64 6f 63 75 6d | to sign| a docum|
|00000650| 65 6e 74 20 61 66 74 65 | 72 20 69 74 20 68 61 73 |ent afte|r it has|
|00000660| 20 62 65 65 6e 20 73 61 | 76 65 64 20 74 6f 20 64 | been sa|ved to d|
|00000670| 69 73 6b 2c 20 61 6e 64 | 20 74 6f 20 76 65 72 69 |isk, and| to veri|
|00000680| 66 79 20 61 6e 20 65 78 | 69 73 74 69 6e 67 20 73 |fy an ex|isting s|
|00000690| 69 67 6e 65 64 20 64 6f | 63 75 6d 65 6e 74 2e 09 |igned do|cument..|
|000006a0| 0d 09 43 53 69 67 6e 65 | 64 4f 62 6a 65 63 74 09 |..CSigne|dObject.|
|000006b0| 54 68 69 73 20 63 6c 61 | 73 73 20 61 6c 6c 6f 77 |This cla|ss allow|
|000006c0| 73 20 73 69 67 6e 69 6e | 67 20 6f 72 20 76 65 72 |s signin|g or ver|
|000006d0| 69 66 79 69 6e 67 20 61 | 20 64 61 74 61 20 6f 62 |ifying a| data ob|
|000006e0| 6a 65 63 74 2e 20 59 6f | 75 72 20 61 70 70 6c 69 |ject. Yo|ur appli|
|000006f0| 63 61 74 69 6f 6e 20 73 | 68 6f 75 6c 64 20 63 72 |cation s|hould cr|
|00000700| 65 61 74 65 20 61 20 73 | 75 62 63 6c 61 73 73 20 |eate a s|ubclass |
|00000710| 77 69 74 68 20 74 68 65 | 20 6e 65 63 65 73 73 61 |with the| necessa|
|00000720| 72 79 20 63 6f 6e 74 65 | 6e 74 20 61 6e 64 20 6d |ry conte|nt and m|
|00000730| 65 74 68 6f 64 73 2e 20 | 59 6f 75 20 63 61 6e 20 |ethods. |You can |
|00000740| 74 68 65 6e 20 75 73 65 | 20 43 53 69 67 6e 65 64 |then use| CSigned|
|00000750| 4f 62 6a 65 63 74 20 6d | 65 74 68 6f 64 73 20 74 |Object m|ethods t|
|00000760| 6f 20 73 69 67 6e 20 6f | 72 20 76 65 72 69 66 79 |o sign o|r verify|
|00000770| 20 74 68 65 20 6f 62 6a | 65 63 74 d5 73 20 61 63 | the obj|ect.s ac|
|00000780| 74 75 61 6c 20 64 61 74 | 61 2e 09 0d 53 61 6d 70 |tual dat|a...Samp|
|00000790| 6c 65 20 50 72 6f 67 72 | 61 6d 0d 54 68 65 20 73 |le Progr|am.The s|
|000007a0| 61 6d 70 6c 65 20 70 72 | 6f 67 72 61 6d 20 69 73 |ample pr|ogram is|
|000007b0| 20 61 6e 20 65 78 74 65 | 6e 73 69 6f 6e 20 6f 66 | an exte|nsion of|
|000007c0| 20 74 68 65 20 54 68 69 | 6e 6b 20 43 6c 61 73 73 | the Thi|nk Class|
|000007d0| 20 4c 69 62 72 61 72 79 | 20 d2 54 69 6e 79 45 64 | Library| .TinyEd|
|000007e0| 69 74 d3 20 73 61 6d 70 | 6c 65 20 61 70 70 6c 69 |it. samp|le appli|
|000007f0| 63 61 74 69 6f 6e 2e 20 | 49 74 20 65 78 74 65 6e |cation. |It exten|
|00000800| 64 73 20 74 68 65 20 43 | 45 64 69 74 44 6f 63 20 |ds the C|EditDoc |
|00000810| 63 6c 61 73 73 20 74 6f | 20 70 72 6f 76 69 64 65 |class to| provide|
|00000820| 20 66 6f 72 20 73 69 67 | 6e 65 64 20 61 6e 64 20 | for sig|ned and |
|00000830| 76 65 72 69 66 69 65 64 | 20 74 65 78 74 20 66 69 |verified| text fi|
|00000840| 6c 65 73 20 61 6e 64 20 | 61 64 64 73 20 61 20 73 |les and |adds a s|
|00000850| 61 6d 70 6c 65 20 63 6c | 61 73 73 20 74 6f 20 73 |ample cl|ass to s|
|00000860| 68 6f 77 20 68 6f 77 20 | 79 6f 75 20 63 61 6e 20 |how how |you can |
|00000870| 73 69 67 6e 20 61 6e 64 | 20 76 65 72 69 66 79 20 |sign and| verify |
|00000880| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |the cont|ents of |
|00000890| 61 20 64 69 61 6c 6f 67 | 2e 20 54 68 65 20 64 65 |a dialog|. The de|
|000008a0| 6d 6f 20 72 65 71 75 69 | 72 65 73 20 74 68 65 20 |mo requi|res the |
|000008b0| 66 6f 6c 6c 6f 77 69 6e | 67 20 73 6f 75 72 63 65 |followin|g source|
|000008c0| 20 66 69 6c 65 73 20 61 | 6e 64 20 74 68 65 69 72 | files a|nd their|
|000008d0| 20 68 65 61 64 65 72 73 | 3a 0d 46 69 6c 65 09 44 | headers|:.File.D|
|000008e0| 65 73 63 72 69 70 74 69 | 6f 6e 0d 44 69 67 69 74 |escripti|on.Digit|
|000008f0| 61 6c 53 69 67 6e 61 74 | 75 72 65 44 65 6d 6f 2e |alSignat|ureDemo.|
|00000900| 63 09 54 68 69 73 20 69 | 73 20 74 68 65 20 6d 61 |c.This i|s the ma|
|00000910| 69 6e 20 70 72 6f 67 72 | 61 6d 2e 20 49 74 20 63 |in progr|am. It c|
|00000920| 72 65 61 74 65 73 20 61 | 20 44 65 6d 6f 41 70 70 |reates a| DemoApp|
|00000930| 20 63 6c 61 73 73 2e 0d | 44 65 6d 6f 41 70 70 2e | class..|DemoApp.|
|00000940| 63 09 54 68 69 73 20 69 | 73 20 61 20 73 75 62 63 |c.This i|s a subc|
|00000950| 6c 61 73 73 20 74 6f 20 | 43 45 64 69 74 41 70 70 |lass to |CEditApp|
|00000960| 20 74 68 61 74 20 6c 65 | 74 73 20 79 6f 75 20 6f | that le|ts you o|
|00000970| 70 65 6e 20 73 69 67 6e | 65 64 20 64 6f 63 75 6d |pen sign|ed docum|
|00000980| 65 6e 74 73 20 61 6e 64 | 20 73 74 61 72 74 73 20 |ents and| starts |
|00000990| 74 68 65 20 73 69 67 6e | 65 64 20 6f 62 6a 65 63 |the sign|ed objec|
|000009a0| 74 20 64 65 6d 6f 2e 20 | 49 74 20 61 6c 73 6f 20 |t demo. |It also |
|000009b0| 6f 76 65 72 72 69 64 65 | 73 20 61 20 d2 73 68 75 |override|s a .shu|
|000009c0| 74 64 6f 77 6e d3 20 6d | 65 74 68 6f 64 20 74 6f |tdown. m|ethod to|
|000009d0| 20 65 6e 73 75 72 65 20 | 74 68 61 74 20 74 68 65 | ensure |that the|
|000009e0| 20 73 69 67 6e 61 74 75 | 72 65 20 63 6f 6e 74 65 | signatu|re conte|
|000009f0| 78 74 20 68 61 73 20 62 | 65 65 6e 20 72 65 6d 6f |xt has b|een remo|
|00000a00| 76 65 64 20 77 68 65 6e | 20 79 6f 75 72 20 61 70 |ved when| your ap|
|00000a10| 70 6c 69 63 61 74 69 6f | 6e 20 65 78 69 74 73 2e |plicatio|n exits.|
|00000a20| 0d 44 65 6d 6f 45 64 69 | 74 44 6f 63 2e 63 09 54 |.DemoEdi|tDoc.c.T|
|00000a30| 68 69 73 20 69 73 20 61 | 20 73 75 62 63 6c 61 73 |his is a| subclas|
|00000a40| 73 20 74 6f 20 43 45 64 | 69 74 44 6f 63 20 74 68 |s to CEd|itDoc th|
|00000a50| 61 74 20 6c 65 74 73 20 | 79 6f 75 20 73 69 67 6e |at lets |you sign|
|00000a60| 20 61 6e 64 20 76 65 72 | 69 66 79 20 64 6f 63 75 | and ver|ify docu|
|00000a70| 6d 65 6e 74 73 2e 20 49 | 74 20 61 6c 73 6f 20 68 |ments. I|t also h|
|00000a80| 61 73 20 6d 65 74 68 6f | 64 73 20 6f 76 65 72 72 |as metho|ds overr|
|00000a90| 69 64 65 20 43 45 64 69 | 74 44 6f 63 20 6d 65 74 |ide CEdi|tDoc met|
|00000aa0| 68 6f 64 73 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |hods in |order to|
|00000ab0| 20 70 72 6f 76 69 64 65 | 20 62 65 74 74 65 72 20 | provide| better |
|00000ac0| 65 72 72 6f 72 20 6d 65 | 73 73 61 67 65 73 2e 0d |error me|ssages..|
|00000ad0| 44 65 6d 6f 53 69 67 6e | 65 64 4f 62 6a 65 63 74 |DemoSign|edObject|
|00000ae0| 2e 63 09 54 68 69 73 20 | 6f 62 6a 65 63 74 20 63 |.c.This |object c|
|00000af0| 61 6e 20 73 69 67 6e 20 | 61 6e 64 20 76 65 72 69 |an sign |and veri|
|00000b00| 66 79 20 69 74 73 20 64 | 61 74 61 20 63 6f 6e 74 |fy its d|ata cont|
|00000b10| 65 6e 74 73 2e 20 49 74 | 20 69 73 20 61 20 73 75 |ents. It| is a su|
|00000b20| 62 63 6c 61 73 73 20 74 | 6f 20 43 53 69 67 6e 65 |bclass t|o CSigne|
|00000b30| 64 4f 62 6a 65 63 74 2e | 0d 44 65 6d 6f 53 69 67 |dObject.|.DemoSig|
|00000b40| 6e 65 64 4f 62 6a 65 63 | 74 44 69 61 6c 6f 67 2e |nedObjec|tDialog.|
|00000b50| 63 09 54 68 69 73 20 64 | 69 61 6c 6f 67 20 6d 61 |c.This d|ialog ma|
|00000b60| 6e 61 67 65 73 20 61 20 | 44 65 6d 6f 53 69 67 6e |nages a |DemoSign|
|00000b70| 65 64 4f 62 6a 65 63 74 | 20 69 6e 73 74 61 6e 63 |edObject| instanc|
|00000b80| 65 2e 20 49 74 20 64 69 | 73 70 6c 61 79 73 20 61 |e. It di|splays a|
|00000b90| 20 64 69 61 6c 6f 67 20 | 74 68 61 74 20 6c 65 74 | dialog |that let|
|00000ba0| 73 20 79 6f 75 20 63 68 | 61 6e 67 65 20 63 68 65 |s you ch|ange che|
|00000bb0| 63 6b 62 6f 78 20 61 6e | 64 20 74 65 78 74 20 69 |ckbox an|d text i|
|00000bc0| 74 65 6d 73 2c 20 61 6e | 64 20 63 6f 6e 74 72 6f |tems, an|d contro|
|00000bd0| 6c 73 20 73 69 67 6e 69 | 6e 67 2c 20 76 65 72 69 |ls signi|ng, veri|
|00000be0| 66 79 69 6e 67 2c 20 61 | 6e 64 20 6f 74 68 65 72 |fying, a|nd other|
|00000bf0| 20 43 53 69 67 6e 65 64 | 4f 62 6a 65 63 74 20 66 | CSigned|Object f|
|00000c00| 75 6e 63 74 69 6f 6e 73 | 2e 20 49 74 20 69 73 20 |unctions|. It is |
|00000c10| 61 20 73 75 62 63 6c 61 | 73 73 20 74 6f 20 43 44 |a subcla|ss to CD|
|00000c20| 4c 4f 47 44 69 72 65 63 | 74 6f 72 2e 20 41 6c 74 |LOGDirec|tor. Alt|
|00000c30| 68 6f 75 67 68 20 69 74 | 20 61 70 70 65 61 72 73 |hough it| appears|
|00000c40| 20 74 6f 20 74 68 65 20 | 75 73 65 72 20 61 73 20 | to the |user as |
|00000c50| 61 20 6d 6f 64 61 6c 20 | 64 69 61 6c 6f 67 2c 20 |a modal |dialog, |
|00000c60| 69 74 20 69 73 20 61 63 | 74 75 61 6c 6c 79 20 69 |it is ac|tually i|
|00000c70| 6d 70 6c 65 6d 65 6e 74 | 65 64 20 61 73 20 61 20 |mplement|ed as a |
|00000c80| 6e 6f 72 6d 61 6c 20 77 | 69 6e 64 6f 77 2e 0d 45 |normal w|indow..E|
|00000c90| 72 72 6f 72 4d 65 73 73 | 61 67 65 2e 63 09 54 68 |rrorMess|age.c.Th|
|00000ca0| 69 73 20 66 69 6c 65 20 | 63 6f 6e 74 61 69 6e 73 |is file |contains|
|00000cb0| 20 74 77 6f 20 73 69 6d | 70 6c 65 20 64 69 73 70 | two sim|ple disp|
|00000cc0| 6c 61 79 20 66 75 6e 63 | 74 69 6f 6e 73 20 66 6f |lay func|tions fo|
|00000cd0| 72 20 64 65 62 75 67 67 | 69 6e 67 20 63 6f 6e 76 |r debugg|ing conv|
|00000ce0| 65 6e 69 65 6e 63 65 2e | 20 45 72 72 6f 72 20 6d |enience.| Error m|
|00000cf0| 65 73 73 61 67 65 73 20 | 77 65 72 65 20 69 6e 63 |essages |were inc|
|00000d00| 6c 75 64 65 64 20 77 69 | 74 68 69 6e 20 74 68 65 |luded wi|thin the|
|00000d10| 20 70 72 6f 67 72 61 6d | 20 74 65 78 74 20 73 6f | program| text so|
|00000d20| 20 74 68 65 72 65 20 77 | 61 73 20 61 20 73 69 6e | there w|as a sin|
|00000d30| 67 6c 65 20 72 65 66 65 | 72 65 6e 63 65 20 70 6f |gle refe|rence po|
|00000d40| 69 6e 74 20 74 68 61 74 | 20 65 78 70 6c 61 69 6e |int that| explain|
|00000d50| 73 20 65 72 72 6f 72 73 | 2e 20 41 20 70 72 6f 64 |s errors|. A prod|
|00000d60| 75 63 74 69 6f 6e 20 70 | 72 6f 67 72 61 6d 20 73 |uction p|rogram s|
|00000d70| 68 6f 75 6c 64 20 70 72 | 65 66 65 72 61 62 6c 79 |hould pr|eferably|
|00000d80| 20 73 74 6f 72 65 20 69 | 74 73 20 65 72 72 6f 72 | store i|ts error|
|00000d90| 20 6d 65 73 73 61 67 65 | 73 20 69 6e 20 72 65 73 | message|s in res|
|00000da0| 6f 75 72 63 65 20 66 69 | 6c 65 73 0d 53 49 47 53 |ource fi|les.SIGS|
|00000db0| 74 61 74 75 73 4d 61 6e | 61 67 65 72 2e 63 09 54 |tatusMan|ager.c.T|
|00000dc0| 68 69 73 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |his cont|ains the|
|00000dd0| 20 73 74 61 74 75 73 20 | 77 69 6e 64 6f 77 20 6d | status |window m|
|00000de0| 61 6e 61 67 65 72 2c 20 | 77 69 6e 64 6f 77 2c 20 |anager, |window, |
|00000df0| 61 6e 64 20 77 69 6e 64 | 6f 77 20 63 6f 6e 74 65 |and wind|ow conte|
|00000e00| 6e 74 73 2e 20 54 68 69 | 73 20 77 69 6e 64 6f 77 |nts. Thi|s window|
|00000e10| 20 69 73 20 64 69 73 70 | 6c 61 79 65 64 20 77 68 | is disp|layed wh|
|00000e20| 65 6e 20 79 6f 75 20 73 | 70 65 63 69 66 79 20 74 |en you s|pecify t|
|00000e30| 68 65 20 62 75 69 6c 74 | 2d 69 6e 20 73 74 61 74 |he built|-in stat|
|00000e40| 75 73 20 77 69 6e 64 6f | 77 20 66 6f 72 20 61 20 |us windo|w for a |
|00000e50| 53 69 67 6e 20 6f 72 20 | 56 65 72 69 66 79 20 6f |Sign or |Verify o|
|00000e60| 70 65 72 61 74 69 6f 6e | 2e 0d 53 79 73 74 65 6d |peration|..System|
|00000e70| 53 75 70 70 6f 72 74 73 | 41 4f 43 45 2e 63 09 54 |Supports|AOCE.c.T|
|00000e80| 68 69 73 20 73 75 62 72 | 6f 75 74 69 6e 65 20 74 |his subr|outine t|
|00000e90| 65 73 74 73 20 66 6f 72 | 20 74 68 65 20 70 72 65 |ests for| the pre|
|00000ea0| 73 65 6e 63 65 20 6f 66 | 20 74 68 65 20 41 4f 43 |sence of| the AOC|
|00000eb0| 45 20 74 6f 6f 6c 62 6f | 78 2e 20 49 74 20 72 65 |E toolbo|x. It re|
|00000ec0| 74 75 72 6e 73 20 61 6e | 20 65 72 72 6f 72 20 69 |turns an| error i|
|00000ed0| 66 20 74 68 65 20 74 6f | 6f 6c 62 6f 78 20 77 61 |f the to|olbox wa|
|00000ee0| 73 20 6e 6f 74 20 69 6e | 73 74 61 6c 6c 65 64 20 |s not in|stalled |
|00000ef0| 6f 72 20 77 61 73 20 64 | 69 73 61 62 6c 65 64 2e |or was d|isabled.|
|00000f00| 0d 50 6f 74 65 6e 74 69 | 61 6c 20 50 72 6f 62 6c |.Potenti|al Probl|
|00000f10| 65 6d 73 0d 54 68 65 72 | 65 20 61 72 65 20 61 20 |ems.Ther|e are a |
|00000f20| 66 65 77 20 74 68 69 6e | 67 73 20 74 68 61 74 20 |few thin|gs that |
|00000f30| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 64 65 76 65 |applicat|ion deve|
|00000f40| 6c 6f 70 65 72 73 20 6e | 65 65 64 20 74 6f 20 62 |lopers n|eed to b|
|00000f50| 65 20 61 77 61 72 65 20 | 6f 66 20 77 68 65 6e 20 |e aware |of when |
|00000f60| 75 73 69 6e 67 20 44 69 | 67 69 74 61 6c 20 53 69 |using Di|gital Si|
|00000f70| 67 6e 61 74 75 72 65 73 | 20 28 74 68 65 73 65 20 |gnatures| (these |
|00000f80| 61 72 65 20 69 6e 64 65 | 70 65 6e 64 65 6e 74 20 |are inde|pendent |
|00000f90| 6f 66 20 74 68 65 20 65 | 78 61 6d 70 6c 65 29 3a |of the e|xample):|
|00000fa0| 0d a5 09 57 68 65 6e 20 | 79 6f 75 72 20 61 70 70 |...When |your app|
|00000fb0| 6c 69 63 61 74 69 6f 6e | 20 65 78 69 74 73 2c 20 |lication| exits, |
|00000fc0| 62 65 20 73 75 72 65 20 | 74 68 61 74 20 79 6f 75 |be sure |that you|
|00000fd0| 20 68 61 76 65 20 64 69 | 73 70 6f 73 65 64 20 6f | have di|sposed o|
|00000fe0| 66 20 74 68 65 20 73 69 | 67 6e 69 6e 67 20 63 6f |f the si|gning co|
|00000ff0| 6e 74 65 78 74 20 28 53 | 49 47 43 6f 6e 74 65 78 |ntext (S|IGContex|
|00001000| 74 50 74 72 20 64 61 74 | 75 6d 29 2e 20 49 6e 20 |tPtr dat|um). In |
|00001010| 67 65 6e 65 72 61 6c 2c | 20 74 68 69 73 20 6d 65 |general,| this me|
|00001020| 61 6e 73 20 74 68 61 74 | 20 79 6f 75 72 20 61 70 |ans that| your ap|
|00001030| 70 6c 69 63 61 74 69 6f | 6e 20 73 68 6f 75 6c 64 |plicatio|n should|
|00001040| 20 70 61 74 63 68 20 74 | 68 65 20 45 78 69 74 54 | patch t|he ExitT|
|00001050| 6f 53 68 65 6c 6c 20 74 | 72 61 70 20 77 69 74 68 |oShell t|rap with|
|00001060| 20 61 20 73 6d 61 6c 6c | 20 73 75 62 72 6f 75 74 | a small| subrout|
|00001070| 69 6e 65 20 74 68 61 74 | 20 63 68 65 63 6b 73 20 |ine that| checks |
|00001080| 66 6f 72 20 61 6e 20 61 | 63 74 69 76 65 20 63 6f |for an a|ctive co|
|00001090| 6e 74 65 78 74 2e 20 54 | 68 65 20 73 61 6d 70 6c |ntext. T|he sampl|
|000010a0| 65 20 70 72 6f 67 72 61 | 6d 20 73 74 6f 72 65 73 |e progra|m stores|
|000010b0| 20 74 68 65 20 63 6f 6e | 74 65 78 74 20 70 6f 69 | the con|text poi|
|000010c0| 6e 74 65 72 20 69 6e 20 | 61 20 67 6c 6f 62 61 6c |nter in |a global|
|000010d0| 20 76 61 72 69 61 62 6c | 65 2c 20 61 6e 64 20 6f | variabl|e, and o|
|000010e0| 76 65 72 72 69 64 65 73 | 20 43 41 70 70 6c 69 63 |verrides| CApplic|
|000010f0| 61 74 69 6f 6e 3a 3a 52 | 65 6d 6f 76 65 50 61 74 |ation::R|emovePat|
|00001100| 63 68 65 73 20 74 6f 20 | 63 68 65 63 6b 20 74 68 |ches to |check th|
|00001110| 61 74 20 69 74 20 68 61 | 73 20 62 65 65 6e 20 64 |at it ha|s been d|
|00001120| 65 6c 65 74 65 64 20 77 | 68 65 6e 20 74 68 65 20 |eleted w|hen the |
|00001130| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 65 78 69 74 |applicat|ion exit|
|00001140| 73 2e 0d a5 09 53 69 67 | 6e 69 6e 67 20 61 6e 64 |s....Sig|ning and|
|00001150| 20 76 65 72 69 66 79 69 | 6e 67 20 74 61 6b 65 20 | verifyi|ng take |
|00001160| 61 20 66 61 69 72 6c 79 | 20 6c 6f 6e 67 20 74 69 |a fairly| long ti|
|00001170| 6d 65 3b 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |me; your| applica|
|00001180| 74 69 6f 6e 20 73 68 6f | 75 6c 64 20 75 73 65 20 |tion sho|uld use |
|00001190| 61 20 73 74 61 74 75 73 | 20 70 72 6f 63 65 64 75 |a status| procedu|
|000011a0| 72 65 20 74 6f 20 65 6e | 74 65 72 74 61 69 6e 20 |re to en|tertain |
|000011b0| 74 68 65 20 75 73 65 72 | 20 77 68 69 6c 65 20 73 |the user| while s|
|000011c0| 69 67 6e 69 6e 67 2e 20 | 54 68 69 73 20 65 6e 74 |igning. |This ent|
|000011d0| 61 69 6c 73 20 61 20 62 | 69 74 20 6f 66 20 65 66 |ails a b|it of ef|
|000011e0| 66 6f 72 74 3a 20 79 6f | 75 20 73 68 6f 75 6c 64 |fort: yo|u should|
|000011f0| 20 6e 6f 74 20 69 6e 69 | 74 69 61 74 65 20 73 69 | not ini|tiate si|
|00001200| 67 6e 69 6e 67 20 6f 72 | 20 76 65 72 69 66 79 69 |gning or| verifyi|
|00001210| 6e 67 20 66 72 6f 6d 20 | 61 20 4d 6f 64 61 6c 20 |ng from |a Modal |
|00001220| 44 69 61 6c 6f 67 2c 20 | 62 75 74 20 73 68 6f 75 |Dialog, |but shou|
|00001230| 6c 64 20 75 73 65 20 73 | 6f 6d 65 20 66 6f 72 6d |ld use s|ome form|
|00001240| 20 6f 66 20 d2 73 74 61 | 6e 64 61 72 64 d3 20 77 | of .sta|ndard. w|
|00001250| 69 6e 64 6f 77 20 6f 72 | 20 61 20 6e 6f 6e 2d 6d |indow or| a non-m|
|00001260| 6f 64 61 6c 20 64 69 61 | 6c 6f 67 2e 20 49 6e 20 |odal dia|log. In |
|00001270| 74 68 65 20 65 78 61 6d | 70 6c 65 2c 20 74 68 65 |the exam|ple, the|
|00001280| 20 73 69 67 6e 65 64 20 | 6f 62 6a 65 63 74 20 64 | signed |object d|
|00001290| 65 6d 6f 20 75 73 65 73 | 20 61 20 73 75 62 63 6c |emo uses| a subcl|
|000012a0| 61 73 73 20 6f 66 20 54 | 43 4c d5 73 20 43 44 69 |ass of T|CL.s CDi|
|000012b0| 61 6c 6f 67 20 63 6c 61 | 73 73 2c 20 77 68 69 63 |alog cla|ss, whic|
|000012c0| 68 20 69 6d 70 6c 65 6d | 65 6e 74 73 20 61 20 6d |h implem|ents a m|
|000012d0| 6f 64 61 6c 2d 64 69 61 | 6c 6f 67 20 6c 6f 6f 6b |odal-dia|log look|
|000012e0| 61 6c 69 6b 65 20 75 73 | 69 6e 67 20 74 68 65 20 |alike us|ing the |
|000012f0| 6e 6f 72 6d 61 6c 20 77 | 69 6e 64 6f 77 2d 62 61 |normal w|indow-ba|
|00001300| 73 65 64 20 65 76 65 6e | 74 20 6c 6f 6f 70 2e 20 |sed even|t loop. |
|00001310| 54 68 65 20 72 65 61 73 | 6f 6e 20 66 6f 72 20 74 |The reas|on for t|
|00001320| 68 69 73 20 69 73 20 74 | 68 61 74 20 79 6f 75 72 |his is t|hat your|
|00001330| 20 73 74 61 74 75 73 20 | 63 61 6c 6c 62 61 63 6b | status |callback|
|00001340| 20 73 68 6f 75 6c 64 20 | 63 61 6c 6c 20 79 6f 75 | should |call you|
|00001350| 72 20 6e 6f 72 6d 61 6c | 20 65 76 65 6e 74 20 6c |r normal| event l|
|00001360| 6f 6f 70 3a 20 69 66 20 | 79 6f 75 20 68 61 76 65 |oop: if |you have|
|00001370| 20 61 6e 20 61 63 74 69 | 76 65 20 6d 6f 64 61 6c | an acti|ve modal|
|00001380| 20 64 69 61 6c 6f 67 2c | 20 69 74 20 77 69 6c 6c | dialog,| it will|
|00001390| 20 6e 6f 74 20 72 65 63 | 65 69 76 65 20 75 70 64 | not rec|eive upd|
|000013a0| 61 74 65 20 65 76 65 6e | 74 73 20 70 72 6f 70 65 |ate even|ts prope|
|000013b0| 72 6c 79 2e 0d a5 09 57 | 68 65 6e 20 61 20 66 69 |rly....W|hen a fi|
|000013c0| 6c 65 20 69 73 20 73 69 | 67 6e 65 64 2c 20 69 74 |le is si|gned, it|
|000013d0| 20 69 73 20 73 65 74 20 | d2 6c 6f 63 6b 65 64 2c | is set |.locked,|
|000013e0| d3 20 69 2e 65 2e 2c 20 | 72 65 61 64 2d 6f 6e 6c |. i.e., |read-onl|
|000013f0| 79 20 54 68 69 73 20 6d | 65 61 6e 73 20 74 68 61 |y This m|eans tha|
|00001400| 74 20 79 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |t your a|pplicati|
|00001410| 6f 6e 20 6d 75 73 74 20 | 6f 70 65 6e 20 69 74 20 |on must |open it |
|00001420| 72 65 61 64 2d 6f 6e 6c | 79 20 28 66 73 52 64 50 |read-onl|y (fsRdP|
|00001430| 65 72 6d 29 2e 20 41 6c | 73 6f 2c 20 79 6f 75 72 |erm). Al|so, your|
|00001440| 20 75 73 65 72 73 20 63 | 61 6e 6e 6f 74 20 63 72 | users c|annot cr|
|00001450| 65 61 74 65 20 61 20 6e | 65 77 20 66 69 6c 65 20 |eate a n|ew file |
|00001460| 77 69 74 68 20 74 68 65 | 20 73 61 6d 65 20 6e 61 |with the| same na|
|00001470| 6d 65 20 77 69 74 68 6f | 75 74 20 66 69 72 73 74 |me witho|ut first|
|00001480| 2c 20 6d 61 6e 75 61 6c | 6c 79 2c 20 72 65 6e 61 |, manual|ly, rena|
|00001490| 6d 69 6e 67 20 74 68 65 | 20 66 69 6c 65 20 6f 72 |ming the| file or|
|000014a0| 20 70 6c 61 63 69 6e 67 | 20 69 74 20 69 6e 74 6f | placing| it into|
|000014b0| 20 74 68 65 20 74 72 61 | 73 68 2e 0d a5 09 54 68 | the tra|sh....Th|
|000014c0| 65 20 6d 65 74 68 6f 64 | 20 64 65 73 63 72 69 70 |e method| descrip|
|000014d0| 74 69 6f 6e 73 20 6f 6e | 6c 79 20 64 65 73 63 72 |tions on|ly descr|
|000014e0| 69 62 65 20 74 68 65 20 | 65 72 72 6f 72 73 20 74 |ibe the |errors t|
|000014f0| 68 61 74 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |hat your| applica|
|00001500| 74 69 6f 6e 20 6e 65 65 | 64 73 20 74 6f 20 68 61 |tion nee|ds to ha|
|00001510| 6e 64 6c 65 20 28 62 65 | 63 61 75 73 65 20 74 68 |ndle (be|cause th|
|00001520| 65 79 d5 72 65 20 62 65 | 6e 69 67 6e 20 6f 72 20 |ey.re be|nign or |
|00001530| 65 78 70 65 63 74 65 64 | 29 2e 20 48 6f 77 65 76 |expected|). Howev|
|00001540| 65 72 2c 20 6e 6f 74 65 | 20 74 68 61 74 20 74 68 |er, note| that th|
|00001550| 65 72 65 20 61 72 65 20 | 61 20 6e 75 6d 62 65 72 |ere are |a number|
|00001560| 20 6f 66 20 6f 74 68 65 | 72 20 44 69 67 69 74 61 | of othe|r Digita|
|00001570| 6c 20 53 69 67 6e 61 74 | 75 72 65 20 4d 61 6e 61 |l Signat|ure Mana|
|00001580| 67 65 72 20 65 72 72 6f | 72 73 20 74 68 61 74 20 |ger erro|rs that |
|00001590| 6d 61 79 20 61 6c 73 6f | 20 6f 63 63 75 72 2e 20 |may also| occur. |
|000015a0| 59 6f 75 20 73 68 6f 75 | 6c 64 20 63 61 72 65 66 |You shou|ld caref|
|000015b0| 75 6c 6c 79 20 74 65 73 | 74 20 79 6f 75 72 20 61 |ully tes|t your a|
|000015c0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 74 6f 20 6d 61 |pplicati|on to ma|
|000015d0| 6b 65 20 73 75 72 65 20 | 69 74 20 64 69 73 70 6c |ke sure |it displ|
|000015e0| 61 79 73 20 69 6e 66 6f | 72 6d 61 74 69 76 65 20 |ays info|rmative |
|000015f0| 65 72 72 6f 72 20 6d 65 | 73 73 61 67 65 73 20 69 |error me|ssages i|
|00001600| 6e 20 61 6c 6c 20 63 69 | 72 63 75 6d 73 74 61 6e |n all ci|rcumstan|
|00001610| 63 65 73 2e 0d 09 54 68 | 65 72 65 20 61 72 65 20 |ces...Th|ere are |
|00001620| 61 20 6e 75 6d 62 65 72 | 20 6f 66 20 69 6e 73 74 |a number| of inst|
|00001630| 61 6e 63 65 73 20 77 68 | 65 72 65 20 65 72 72 6f |ances wh|ere erro|
|00001640| 72 73 20 73 68 6f 75 6c | 64 20 62 65 20 64 65 74 |rs shoul|d be det|
|00001650| 65 63 74 65 64 20 69 6e | 20 79 6f 75 72 20 61 70 |ected in| your ap|
|00001660| 70 6c 69 63 61 74 69 6f | 6e 2e 20 46 6f 72 20 65 |plicatio|n. For e|
|00001670| 78 61 6d 70 6c 65 2c 20 | 73 69 67 6e 65 64 20 66 |xample, |signed f|
|00001680| 69 6c 65 73 20 61 72 65 | 20 72 65 61 64 2d 6f 6e |iles are| read-on|
|00001690| 6c 79 20 28 d2 6c 6f 63 | 6b 65 64 d3 29 20 61 6e |ly (.loc|ked.) an|
|000016a0| 64 20 6d 75 73 74 20 62 | 65 20 6f 70 65 6e 65 64 |d must b|e opened|
|000016b0| 20 77 69 74 68 20 70 65 | 72 6d 69 73 73 69 6f 6e | with pe|rmission|
|000016c0| 20 73 65 74 20 74 6f 20 | 66 73 52 64 50 65 72 6d | set to |fsRdPerm|
|000016d0| 2c 20 72 61 74 68 65 72 | 20 74 68 61 6e 20 74 68 |, rather| than th|
|000016e0| 65 20 73 74 61 6e 64 61 | 72 64 20 66 73 52 64 57 |e standa|rd fsRdW|
|000016f0| 72 50 65 72 6d 2e 20 59 | 6f 75 20 73 68 6f 75 6c |rPerm. Y|ou shoul|
|00001700| 64 20 73 65 61 72 63 68 | 20 74 68 65 20 64 65 6d |d search| the dem|
|00001710| 6f 20 66 6f 72 20 4d 65 | 73 73 61 67 65 28 29 20 |o for Me|ssage() |
|00001720| 63 61 6c 6c 73 20 74 6f | 20 73 65 65 20 74 68 6f |calls to| see tho|
|00001730| 73 65 20 65 72 72 6f 72 | 73 20 49 20 66 6f 75 6e |se error|s I foun|
|00001740| 64 20 77 6f 72 74 68 20 | 64 65 74 65 63 74 69 6e |d worth |detectin|
|00001750| 67 2e 20 0d 54 68 65 20 | 72 65 6d 61 69 6e 64 65 |g. .The |remainde|
|00001760| 72 20 6f 66 20 74 68 69 | 73 20 64 6f 63 75 6d 65 |r of thi|s docume|
|00001770| 6e 74 20 64 65 73 63 72 | 69 62 65 73 20 74 68 65 |nt descr|ibes the|
|00001780| 20 69 6e 64 69 76 69 64 | 75 61 6c 20 63 6c 61 73 | individ|ual clas|
|00001790| 73 65 73 2e 0d 43 53 69 | 67 6e 61 74 75 72 65 0d |ses..CSi|gnature.|
|000017a0| 49 6e 74 72 6f 64 75 63 | 74 69 6f 6e 0d 43 53 69 |Introduc|tion.CSi|
|000017b0| 67 6e 61 74 75 72 65 20 | 69 73 20 74 68 65 20 62 |gnature |is the b|
|000017c0| 61 73 65 20 63 6c 61 73 | 73 20 66 6f 72 20 44 69 |ase clas|s for Di|
|000017d0| 67 69 74 61 6c 20 53 69 | 67 6e 61 74 75 72 65 20 |gital Si|gnature |
|000017e0| 70 72 6f 63 65 73 73 69 | 6e 67 2e 20 49 74 20 63 |processi|ng. It c|
|000017f0| 6f 6e 74 61 69 6e 73 20 | 6d 65 74 68 6f 64 73 20 |ontains |methods |
|00001800| 74 68 61 74 20 61 6c 6c | 20 44 69 67 69 74 61 6c |that all| Digital|
|00001810| 20 53 69 67 6e 61 74 75 | 72 65 20 70 72 6f 63 65 | Signatu|re proce|
|00001820| 73 73 69 6e 67 20 72 65 | 71 75 69 72 65 73 2c 20 |ssing re|quires, |
|00001830| 61 73 20 77 65 6c 6c 20 | 61 73 20 61 20 66 65 77 |as well |as a few|
|00001840| 20 75 74 69 6c 69 74 79 | 20 63 6c 61 73 73 65 73 | utility| classes|
|00001850| 2e 20 59 6f 75 72 20 61 | 70 70 6c 69 63 61 74 69 |. Your a|pplicati|
|00001860| 6f 6e 20 64 6f 65 73 20 | 6e 6f 74 20 75 73 65 20 |on does |not use |
|00001870| 43 53 69 67 6e 61 74 75 | 72 65 20 64 69 72 65 63 |CSignatu|re direc|
|00001880| 74 6c 79 2c 20 62 75 74 | 20 72 61 74 68 65 72 20 |tly, but| rather |
|00001890| 75 73 65 73 20 6f 6e 65 | 20 6f 66 20 69 74 73 20 |uses one| of its |
|000018a0| 73 75 62 2d 63 6c 61 73 | 73 65 73 2e 0d 48 65 72 |sub-clas|ses..Her|
|000018b0| 69 74 61 67 65 0d 53 75 | 70 65 72 63 6c 61 73 73 |itage.Su|perclass|
|000018c0| 09 43 4f 62 6a 65 63 74 | 0d 53 75 62 63 6c 61 73 |.CObject|.Subclas|
|000018d0| 73 65 73 09 43 53 69 67 | 6e 65 64 44 61 74 61 46 |ses.CSig|nedDataF|
|000018e0| 69 6c 65 2c 20 43 53 69 | 67 6e 65 64 4f 62 6a 65 |ile, CSi|gnedObje|
|000018f0| 63 74 0d 47 6c 6f 62 61 | 6c 20 56 61 72 69 61 62 |ct.Globa|l Variab|
|00001900| 6c 65 73 0d 56 61 72 69 | 61 62 6c 65 09 54 79 70 |les.Vari|able.Typ|
|00001910| 65 09 44 65 73 63 72 69 | 70 74 69 6f 6e 0d 67 53 |e.Descri|ption.gS|
|00001920| 49 47 53 74 61 74 75 73 | 50 72 6f 63 09 53 49 47 |IGStatus|Proc.SIG|
|00001930| 53 74 61 74 75 73 50 72 | 6f 63 50 74 72 09 44 65 |StatusPr|ocPtr.De|
|00001940| 66 61 75 6c 74 20 73 74 | 61 74 75 73 20 70 72 6f |fault st|atus pro|
|00001950| 63 65 64 75 72 65 3a 20 | 70 61 73 73 20 74 68 69 |cedure: |pass thi|
|00001960| 73 20 74 6f 20 53 69 67 | 6e 2c 20 53 69 67 6e 46 |s to Sig|n, SignF|
|00001970| 69 6c 65 2c 20 65 74 63 | 2e 20 74 6f 20 75 73 65 |ile, etc|. to use|
|00001980| 20 74 68 65 20 62 75 69 | 6c 74 2d 69 6e 20 70 72 | the bui|lt-in pr|
|00001990| 6f 63 65 64 75 72 65 2e | 0d 67 53 49 47 43 6f 6e |ocedure.|.gSIGCon|
|000019a0| 74 65 78 74 50 74 72 09 | 53 49 47 43 6f 6e 74 65 |textPtr.|SIGConte|
|000019b0| 78 74 50 74 72 09 54 68 | 65 20 53 69 67 6e 65 72 |xtPtr.Th|e Signer|
|000019c0| 20 4d 61 6e 61 67 65 72 | 20 63 6f 6e 74 65 78 74 | Manager| context|
|000019d0| 2e 20 42 65 20 73 75 72 | 65 20 74 68 61 74 20 79 |. Be sur|e that y|
|000019e0| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|000019f0| 64 69 73 70 6f 73 65 73 | 20 6f 66 20 61 6e 79 20 |disposes| of any |
|00001a00| 63 6f 6e 74 65 78 74 20 | 62 65 66 6f 72 65 20 69 |context |before i|
|00001a10| 74 20 74 65 72 6d 69 6e | 61 74 65 73 2e 0d 47 6c |t termin|ates..Gl|
|00001a20| 6f 62 61 6c 20 46 75 6e | 63 74 69 6f 6e 73 0d 76 |obal Fun|ctions.v|
|00001a30| 6f 69 64 09 09 09 09 44 | 69 73 70 6f 73 65 53 69 |oid....D|isposeSi|
|00001a40| 67 6e 65 72 43 6f 6e 74 | 65 78 74 28 76 6f 69 64 |gnerCont|ext(void|
|00001a50| 29 3b 0d 44 69 73 70 6f | 73 65 20 6f 66 20 74 68 |);.Dispo|se of th|
|00001a60| 65 20 73 69 67 6e 65 72 | 20 63 6f 6e 74 65 78 74 |e signer| context|
|00001a70| 2c 20 69 66 20 69 74 20 | 65 78 69 73 74 73 2e 20 |, if it |exists. |
|00001a80| 54 68 69 73 20 6d 75 73 | 74 20 62 65 20 63 61 6c |This mus|t be cal|
|00001a90| 6c 65 64 20 77 68 65 6e | 20 79 6f 75 72 20 61 70 |led when| your ap|
|00001aa0| 70 6c 69 63 61 74 69 6f | 6e 20 65 78 69 74 73 20 |plicatio|n exits |
|00001ab0| 28 79 6f 75 20 73 68 6f | 75 6c 64 20 74 72 61 70 |(you sho|uld trap|
|00001ac0| 20 45 78 69 74 54 6f 53 | 68 65 6c 6c 20 73 6f 20 | ExitToS|hell so |
|00001ad0| 79 6f 75 20 63 61 6c 6c | 20 44 69 73 70 6f 73 65 |you call| Dispose|
|00001ae0| 53 69 67 6e 65 72 43 6f | 6e 74 65 78 74 20 65 76 |SignerCo|ntext ev|
|00001af0| 65 6e 20 69 66 20 79 6f | 75 72 20 61 70 70 6c 69 |en if yo|ur appli|
|00001b00| 63 61 74 69 6f 6e 20 63 | 72 61 73 68 65 73 29 2e |cation c|rashes).|
|00001b10| 0d 49 6e 73 74 61 6e 63 | 65 20 56 61 72 69 61 62 |.Instanc|e Variab|
|00001b20| 6c 65 73 0d 56 61 72 69 | 61 62 6c 65 09 54 79 70 |les.Vari|able.Typ|
|00001b30| 65 09 44 65 73 63 72 69 | 70 74 69 6f 6e 0d 69 74 |e.Descri|ption.it|
|00001b40| 73 43 6f 6e 74 65 78 74 | 54 79 70 65 09 75 6e 73 |sContext|Type.uns|
|00001b50| 69 67 6e 65 64 20 6c 6f | 6e 67 09 54 68 69 73 20 |igned lo|ng.This |
|00001b60| 69 73 20 74 68 65 20 74 | 79 70 65 20 6f 66 20 74 |is the t|ype of t|
|00001b70| 68 65 20 63 6f 6e 74 65 | 78 74 20 76 61 72 69 61 |he conte|xt varia|
|00001b80| 62 6c 65 3a 20 69 74 20 | 69 73 20 6e 65 65 64 65 |ble: it |is neede|
|00001b90| 64 20 6f 6e 6c 79 20 62 | 79 20 6d 65 74 68 6f 64 |d only b|y method|
|00001ba0| 73 20 74 68 61 74 20 65 | 6e 61 62 6c 65 2f 64 69 |s that e|nable/di|
|00001bb0| 73 61 62 6c 65 20 74 68 | 65 20 53 68 6f 77 53 69 |sable th|e ShowSi|
|00001bc0| 67 6e 65 72 20 6f 70 74 | 69 6f 6e 20 61 73 20 74 |gner opt|ion as t|
|00001bd0| 68 61 74 20 6f 70 74 69 | 6f 6e 20 69 73 20 76 61 |hat opti|on is va|
|00001be0| 6c 69 64 20 6f 6e 6c 79 | 20 61 66 74 65 72 20 76 |lid only| after v|
|00001bf0| 65 72 69 66 79 69 6e 67 | 20 61 6e 20 6f 62 6a 65 |erifying| an obje|
|00001c00| 63 74 20 6f 72 20 66 69 | 6c 65 2e 0d 69 74 73 53 |ct or fi|le..itsS|
|00001c10| 74 61 74 75 73 4d 61 6e | 61 67 65 72 09 53 49 47 |tatusMan|ager.SIG|
|00001c20| 53 74 61 74 75 73 4d 61 | 6e 61 67 65 72 09 41 6e |StatusMa|nager.An|
|00001c30| 20 69 6e 73 74 61 6e 63 | 65 20 6f 66 20 74 68 69 | instanc|e of thi|
|00001c40| 73 20 63 6c 61 73 73 20 | 69 73 20 63 72 65 61 74 |s class |is creat|
|00001c50| 65 64 20 69 66 20 79 6f | 75 20 73 70 65 63 69 66 |ed if yo|u specif|
|00001c60| 79 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 73 74 |y the de|fault st|
|00001c70| 61 74 75 73 20 77 69 6e | 64 6f 77 2e 0d 4d 65 74 |atus win|dow..Met|
|00001c80| 68 6f 64 73 0d 43 6f 6e | 73 74 72 75 63 74 69 6f |hods.Con|structio|
|00001c90| 6e 20 61 6e 64 20 64 65 | 73 74 72 75 63 74 69 6f |n and de|structio|
|00001ca0| 6e 20 6d 65 74 68 6f 64 | 73 0d 76 6f 69 64 09 09 |n method|s.void..|
|00001cb0| 09 09 49 53 69 67 6e 61 | 74 75 72 65 28 76 6f 69 |..ISigna|ture(voi|
|00001cc0| 64 29 3b 0d 49 6e 69 74 | 69 61 6c 69 7a 65 20 74 |d);.Init|ialize t|
|00001cd0| 68 65 20 70 72 69 76 61 | 74 65 20 76 61 72 69 61 |he priva|te varia|
|00001ce0| 62 6c 65 73 2e 0d 76 6f | 69 64 09 09 09 09 44 69 |bles..vo|id....Di|
|00001cf0| 73 70 6f 73 65 28 76 6f | 69 64 29 3b 0d 44 65 6c |spose(vo|id);.Del|
|00001d00| 65 74 65 20 61 6e 79 20 | 63 6f 6e 74 65 78 74 20 |ete any |context |
|00001d10| 61 6e 64 20 73 69 67 6e | 61 74 75 72 65 20 61 6e |and sign|ature an|
|00001d20| 64 20 64 69 73 70 6f 73 | 65 20 6f 66 20 74 68 65 |d dispos|e of the|
|00001d30| 20 43 53 69 67 6e 61 74 | 75 72 65 20 6f 62 6a 65 | CSignat|ure obje|
|00001d40| 63 74 2e 0d 53 69 67 6e | 65 72 20 43 6f 6e 74 65 |ct..Sign|er Conte|
|00001d50| 78 74 20 4d 65 74 68 6f | 64 73 0d 76 6f 69 64 09 |xt Metho|ds.void.|
|00001d60| 09 09 4e 65 77 43 6f 6e | 74 65 78 74 28 0d 09 75 |..NewCon|text(..u|
|00001d70| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 09 09 63 6f |nsigned |long..co|
|00001d80| 6e 74 65 78 74 54 79 70 | 65 0d 29 3b 0d 43 72 65 |ntextTyp|e.);.Cre|
|00001d90| 61 74 65 20 61 20 6e 65 | 77 20 63 6f 6e 74 65 78 |ate a ne|w contex|
|00001da0| 74 20 6f 66 20 74 68 65 | 20 69 6e 64 69 63 61 74 |t of the| indicat|
|00001db0| 65 64 20 74 79 70 65 2e | 20 54 68 65 20 63 6f 6e |ed type.| The con|
|00001dc0| 74 65 78 74 54 79 70 65 | 20 70 61 72 61 6d 65 74 |textType| paramet|
|00001dd0| 65 72 20 6d 61 79 20 62 | 65 20 6f 6e 65 20 6f 66 |er may b|e one of|
|00001de0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 76 | the fol|lowing v|
|00001df0| 61 6c 75 65 73 2c 20 77 | 68 69 63 68 20 61 72 65 |alues, w|hich are|
|00001e00| 20 64 65 66 69 6e 65 64 | 20 69 6e 20 3c 44 69 67 | defined| in <Dig|
|00001e10| 69 74 61 6c 53 69 67 6e | 61 74 75 72 65 2e 68 3e |italSign|ature.h>|
|00001e20| 0d 6b 53 49 47 53 69 67 | 6e 09 53 69 67 6e 69 6e |.kSIGSig|n.Signin|
|00001e30| 67 20 61 20 66 69 6c 65 | 20 6f 72 20 6f 62 6a 65 |g a file| or obje|
|00001e40| 63 74 0d 6b 53 49 47 56 | 65 72 69 66 79 09 56 65 |ct.kSIGV|erify.Ve|
|00001e50| 72 69 66 79 69 6e 67 20 | 61 20 66 69 6c 65 20 6f |rifying |a file o|
|00001e60| 72 20 6f 62 6a 65 63 74 | 0d 6b 53 49 47 44 69 67 |r object|.kSIGDig|
|00001e70| 65 73 74 09 50 72 65 70 | 61 72 69 6e 67 20 61 20 |est.Prep|aring a |
|00001e80| 64 69 67 65 73 74 20 6f | 66 20 61 6e 20 6f 62 6a |digest o|f an obj|
|00001e90| 65 63 74 0d 76 6f 69 64 | 09 09 09 09 43 68 65 63 |ect.void|....Chec|
|00001ea0| 6b 46 6f 72 43 6f 6e 74 | 65 78 74 28 76 6f 69 64 |kForCont|ext(void|
|00001eb0| 29 3b 0d 46 61 69 6c 20 | 69 66 20 74 68 65 72 65 |);.Fail |if there|
|00001ec0| 20 69 73 20 6e 6f 20 63 | 75 72 72 65 6e 74 20 63 | is no c|urrent c|
|00001ed0| 6f 6e 74 65 78 74 20 77 | 69 74 68 20 61 20 6b 53 |ontext w|ith a kS|
|00001ee0| 49 47 43 6f 6e 74 65 78 | 74 50 72 65 70 61 72 65 |IGContex|tPrepare|
|00001ef0| 45 72 72 2e 20 54 68 69 | 73 20 77 6f 75 6c 64 20 |Err. Thi|s would |
|00001f00| 69 6e 64 69 63 61 74 65 | 20 61 20 70 72 6f 67 72 |indicate| a progr|
|00001f10| 61 6d 6d 69 6e 67 20 65 | 72 72 6f 72 20 77 68 65 |amming e|rror whe|
|00001f20| 72 65 20 6f 6e 65 20 6f | 66 20 74 68 65 20 72 6f |re one o|f the ro|
|00001f30| 75 74 69 6e 65 73 20 74 | 68 61 74 20 72 65 71 75 |utines t|hat requ|
|00001f40| 69 72 65 73 20 61 20 63 | 6f 6e 74 65 78 74 20 77 |ires a c|ontext w|
|00001f50| 61 73 20 63 61 6c 6c 65 | 64 20 77 68 65 6e 20 74 |as calle|d when t|
|00001f60| 68 65 72 65 20 77 61 73 | 20 6e 6f 20 63 6f 6e 74 |here was| no cont|
|00001f70| 65 78 74 2e 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |ext. For| example|
|00001f80| 2c 20 63 61 6c 6c 69 6e | 67 20 53 69 67 6e 20 77 |, callin|g Sign w|
|00001f90| 68 65 6e 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |hen your| applica|
|00001fa0| 74 69 6f 6e 20 68 61 73 | 6e d5 74 20 63 61 6c 6c |tion has|n.t call|
|00001fb0| 65 64 20 53 69 67 6e 50 | 72 65 70 61 72 65 2c 20 |ed SignP|repare, |
|00001fc0| 77 6f 75 6c 64 20 63 61 | 75 73 65 20 74 68 69 73 |would ca|use this|
|00001fd0| 20 66 61 69 6c 75 72 65 | 2e 0d 75 6e 73 69 67 6e | failure|..unsign|
|00001fe0| 65 64 20 6c 6f 6e 67 09 | 09 47 65 74 43 6f 6e 74 |ed long.|.GetCont|
|00001ff0| 65 78 74 54 79 70 65 28 | 76 6f 69 64 29 3b 0d 52 |extType(|void);.R|
|00002000| 65 74 75 72 6e 20 7a 65 | 72 6f 20 69 66 20 74 68 |eturn ze|ro if th|
|00002010| 65 72 65 20 69 73 20 6e | 6f 20 63 75 72 72 65 6e |ere is n|o curren|
|00002020| 74 20 63 6f 6e 74 65 78 | 74 2c 20 65 6c 73 65 20 |t contex|t, else |
|00002030| 74 68 65 20 74 79 70 65 | 20 74 68 61 74 20 77 61 |the type| that wa|
|00002040| 73 20 73 70 65 63 69 66 | 69 65 64 20 77 68 65 6e |s specif|ied when|
|00002050| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00002060| 20 63 61 6c 6c 65 64 20 | 4e 65 77 53 69 67 6e 65 | called |NewSigne|
|00002070| 72 43 6f 6e 74 65 78 74 | 2e 0d 53 69 67 6e 61 74 |rContext|..Signat|
|00002080| 75 72 65 20 4d 65 74 68 | 6f 64 73 0d 53 69 7a 65 |ure Meth|ods.Size|
|00002090| 09 09 09 09 53 69 67 6e | 50 72 65 70 61 72 65 28 |....Sign|Prepare(|
|000020a0| 0d 09 63 6f 6e 73 74 20 | 46 53 53 70 65 63 09 09 |..const |FSSpec..|
|000020b0| 2a 73 69 67 6e 65 72 46 | 69 6c 65 2c 0d 09 43 6f |*signerF|ile,..Co|
|000020c0| 6e 73 74 53 74 72 32 35 | 35 50 61 72 61 6d 09 2a |nstStr25|5Param.*|
|000020d0| 70 72 6f 6d 70 74 0d 29 | 3b 0d 53 69 67 6e 50 72 |prompt.)|;.SignPr|
|000020e0| 65 70 61 72 65 20 70 72 | 65 70 61 72 65 73 20 74 |epare pr|epares t|
|000020f0| 68 65 20 53 69 67 6e 65 | 72 20 4d 61 6e 61 67 65 |he Signe|r Manage|
|00002100| 72 20 74 6f 20 73 69 67 | 6e 20 61 20 64 6f 63 75 |r to sig|n a docu|
|00002110| 6d 65 6e 74 20 6f 72 20 | 64 61 74 61 2e 20 49 66 |ment or |data. If|
|00002120| 20 73 69 67 6e 65 72 46 | 69 6c 65 20 69 73 20 6e | signerF|ile is n|
|00002130| 6f 74 20 4e 55 4c 4c 2c | 20 69 74 20 77 69 6c 6c |ot NULL,| it will|
|00002140| 20 62 65 20 75 73 65 64 | 20 74 6f 20 64 65 66 69 | be used| to defi|
|00002150| 6e 65 20 74 68 65 20 73 | 69 67 6e 65 72 20 66 69 |ne the s|igner fi|
|00002160| 6c 65 2c 20 77 68 69 6c | 65 20 69 66 20 4e 55 4c |le, whil|e if NUL|
|00002170| 4c 2c 20 74 68 65 20 74 | 6f 6f 6c 62 6f 78 20 77 |L, the t|oolbox w|
|00002180| 69 6c 6c 20 70 72 6f 6d | 70 74 20 66 6f 72 20 74 |ill prom|pt for t|
|00002190| 68 65 20 75 73 65 72 d5 | 73 20 73 69 67 6e 65 72 |he user.|s signer|
|000021a0| 20 66 69 6c 65 2e 20 50 | 72 6f 6d 70 74 20 69 73 | file. P|rompt is|
|000021b0| 20 75 73 65 64 20 74 6f | 20 70 72 6f 6d 70 74 20 | used to| prompt |
|000021c0| 74 68 65 20 75 73 65 72 | 20 66 6f 72 20 61 20 73 |the user| for a s|
|000021d0| 69 67 6e 65 72 20 66 69 | 6c 65 2c 20 69 66 20 22 |igner fi|le, if "|
|000021e0| 5c 70 22 2c 20 74 68 65 | 20 64 65 66 61 75 6c 74 |\p", the| default|
|000021f0| 20 70 72 6f 6d 70 74 20 | 77 69 6c 6c 20 62 65 20 | prompt |will be |
|00002200| 75 73 65 64 2e 20 53 69 | 67 6e 50 72 65 70 61 72 |used. Si|gnPrepar|
|00002210| 65 20 72 65 74 75 72 6e | 73 20 74 68 65 20 73 69 |e return|s the si|
|00002220| 7a 65 20 6f 66 20 74 68 | 65 20 53 69 67 6e 61 74 |ze of th|e Signat|
|00002230| 75 72 65 20 72 65 63 6f | 72 64 2e 0d 53 69 67 6e |ure reco|rd..Sign|
|00002240| 50 72 65 70 61 72 65 20 | 6f 75 72 20 61 70 70 6c |Prepare |our appl|
|00002250| 69 63 61 74 69 6f 6e 20 | 73 68 6f 75 6c 64 20 20 |ication |should |
|00002260| 75 73 65 20 61 20 54 52 | 59 2f 43 41 54 43 48 20 |use a TR|Y/CATCH |
|00002270| 63 6f 6e 74 65 78 74 20 | 74 6f 20 64 65 74 65 63 |context |to detec|
|00002280| 74 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |t the fo|llowing |
|00002290| 65 72 72 6f 72 73 3a 0d | 6b 53 69 67 55 73 65 72 |errors:.|kSigUser|
|000022a0| 43 61 6e 63 65 6c 65 64 | 09 54 68 65 20 75 73 65 |Canceled|.The use|
|000022b0| 72 20 63 61 6e 63 65 6c | 6c 65 64 20 74 68 69 73 |r cancel|led this|
|000022c0| 20 73 69 67 6e 65 72 20 | 72 65 71 75 65 73 74 2e | signer |request.|
|000022d0| 20 59 6f 75 20 6d 61 79 | 20 63 68 6f 6f 73 65 20 | You may| choose |
|000022e0| 74 6f 20 69 67 6e 6f 72 | 65 20 74 68 69 73 20 65 |to ignor|e this e|
|000022f0| 72 72 6f 72 2e 09 0d 6b | 53 49 47 50 61 73 73 77 |rror...k|SIGPassw|
|00002300| 6f 72 64 45 72 72 09 54 | 68 65 20 75 73 65 72 20 |ordErr.T|he user |
|00002310| 64 69 64 20 6e 6f 74 20 | 65 6e 74 65 72 20 74 68 |did not |enter th|
|00002320| 65 20 70 72 6f 70 65 72 | 20 70 61 73 73 77 6f 72 |e proper| passwor|
|00002330| 64 20 66 6f 72 20 74 68 | 65 20 64 65 73 69 67 6e |d for th|e design|
|00002340| 61 74 65 64 20 73 69 67 | 6e 65 72 20 66 69 6c 65 |ated sig|ner file|
|00002350| 2e 09 0d 6b 53 49 47 53 | 69 67 6e 65 72 4e 6f 74 |...kSIGS|ignerNot|
|00002360| 56 61 6c 69 64 09 54 68 | 65 20 73 69 67 6e 65 72 |Valid.Th|e signer|
|00002370| 20 66 69 6c 65 20 69 73 | 20 6e 6f 74 20 76 61 6c | file is| not val|
|00002380| 69 64 3b 20 70 65 72 68 | 61 70 73 20 69 74 20 68 |id; perh|aps it h|
|00002390| 61 73 20 65 78 70 69 72 | 65 64 2e 09 0d 0d 76 6f |as expir|ed....vo|
|000023a0| 69 64 09 09 09 09 53 68 | 6f 77 53 69 67 6e 65 72 |id....Sh|owSigner|
|000023b0| 28 76 6f 69 64 29 3b 0d | 41 66 74 65 72 20 79 6f |(void);.|After yo|
|000023c0| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 68 |ur appli|cation h|
|000023d0| 61 73 20 73 75 63 63 65 | 73 73 66 75 6c 6c 79 20 |as succe|ssfully |
|000023e0| 76 65 72 69 66 69 65 64 | 20 61 20 66 69 6c 65 20 |verified| a file |
|000023f0| 6f 72 20 6f 62 6a 65 63 | 74 2c 20 53 68 6f 77 53 |or objec|t, ShowS|
|00002400| 69 67 6e 65 72 20 6d 61 | 79 20 62 65 20 75 73 65 |igner ma|y be use|
|00002410| 64 20 74 6f 20 64 69 73 | 70 6c 61 79 20 74 68 65 |d to dis|play the|
|00002420| 20 65 6e 74 69 72 65 20 | 64 69 73 74 69 6e 67 75 | entire |distingu|
|00002430| 69 73 68 65 64 20 6e 61 | 6d 65 20 6f 66 20 74 68 |ished na|me of th|
|00002440| 65 20 6f 62 6a 65 63 74 | d5 73 20 6f 72 20 66 69 |e object|.s or fi|
|00002450| 6c 65 d5 73 20 73 69 67 | 6e 65 72 2e 20 59 6f 75 |le.s sig|ner. You|
|00002460| 72 20 54 52 59 2f 43 41 | 54 43 48 20 63 6f 6e 74 |r TRY/CA|TCH cont|
|00002470| 65 78 74 20 73 68 6f 75 | 6c 64 20 63 61 74 63 68 |ext shou|ld catch|
|00002480| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 65 | the fol|lowing e|
|00002490| 72 72 6f 72 3a 20 0d 6b | 53 49 47 4f 70 65 72 61 |rror: .k|SIGOpera|
|000024a0| 74 69 6f 6e 49 6e 63 6f | 6d 70 61 74 69 62 6c 65 |tionInco|mpatible|
|000024b0| 45 72 72 09 53 68 6f 77 | 53 69 67 6e 65 72 20 69 |Err.Show|Signer i|
|000024c0| 73 20 76 61 6c 69 64 20 | 6f 6e 6c 79 20 61 66 74 |s valid |only aft|
|000024d0| 65 72 20 76 65 72 69 66 | 69 63 61 74 69 6f 6e 3b |er verif|ication;|
|000024e0| 20 69 74 20 63 61 6e 6e | 6f 74 20 62 65 20 75 73 | it cann|ot be us|
|000024f0| 65 64 20 61 66 74 65 72 | 20 73 69 67 6e 69 6e 67 |ed after| signing|
|00002500| 20 61 6e 20 6f 62 6a 65 | 63 74 20 6f 72 20 66 69 | an obje|ct or fi|
|00002510| 6c 65 2e 20 53 65 65 20 | 74 68 65 20 73 69 67 6e |le. See |the sign|
|00002520| 65 64 20 6f 62 6a 65 63 | 74 20 64 65 6d 6f 20 66 |ed objec|t demo f|
|00002530| 6f 72 20 61 6e 20 65 78 | 61 6d 70 6c 65 20 6f 66 |or an ex|ample of|
|00002540| 20 68 6f 77 20 61 20 62 | 75 74 74 6f 6e 20 74 68 | how a b|utton th|
|00002550| 61 74 20 63 6f 6e 74 72 | 6f 6c 73 20 74 68 69 73 |at contr|ols this|
|00002560| 20 72 65 71 75 65 73 74 | 20 6d 61 79 20 62 65 20 | request| may be |
|00002570| 65 6e 61 62 6c 65 64 20 | 6f 72 20 64 69 73 61 62 |enabled |or disab|
|00002580| 6c 65 64 20 61 73 20 6e | 65 65 64 65 64 2e 09 0d |led as n|eeded...|
|00002590| 0d 76 6f 69 64 09 09 09 | 09 47 65 74 53 69 67 6e |.void...|.GetSign|
|000025a0| 65 72 49 6e 66 6f 28 0d | 09 53 49 47 53 69 67 6e |erInfo(.|.SIGSign|
|000025b0| 65 72 49 6e 66 6f 09 09 | 2a 73 69 67 6e 65 72 49 |erInfo..|*signerI|
|000025c0| 6e 66 6f 0d 29 3b 0d 41 | 66 74 65 72 20 73 75 63 |nfo.);.A|fter suc|
|000025d0| 63 65 73 73 66 75 6c 6c | 79 20 73 69 67 6e 69 6e |cessfull|y signin|
|000025e0| 67 20 6f 72 20 76 65 72 | 69 66 79 69 6e 67 20 61 |g or ver|ifying a|
|000025f0| 6e 20 6f 62 6a 65 63 74 | 20 6f 72 20 66 69 6c 65 |n object| or file|
|00002600| 2c 20 79 6f 75 20 63 61 | 6e 20 63 61 6c 6c 20 74 |, you ca|n call t|
|00002610| 68 69 73 20 6d 65 74 68 | 6f 64 20 74 6f 20 63 6f |his meth|od to co|
|00002620| 70 79 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 61 |py infor|mation a|
|00002630| 62 6f 75 74 20 74 68 65 | 20 73 69 67 6e 65 72 20 |bout the| signer |
|00002640| 74 6f 20 79 6f 75 72 20 | 62 75 66 66 65 72 2e 20 |to your |buffer. |
|00002650| 54 68 65 20 62 75 66 66 | 65 72 20 73 68 6f 75 6c |The buff|er shoul|
|00002660| 64 20 62 65 20 69 6e 20 | 6c 6f 63 6b 65 64 20 6d |d be in |locked m|
|00002670| 65 6d 6f 72 79 2e 20 0d | 42 6f 6f 6c 65 61 6e 09 |emory. .|Boolean.|
|00002680| 09 09 47 65 74 43 65 72 | 74 49 6e 66 6f 28 0d 09 |..GetCer|tInfo(..|
|00002690| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 09 09 63 |unsigned| long..c|
|000026a0| 65 72 74 49 6e 64 65 78 | 2c 0d 09 53 49 47 43 65 |ertIndex|,..SIGCe|
|000026b0| 72 74 49 6e 66 6f 09 09 | 2a 63 65 72 74 49 6e 66 |rtInfo..|*certInf|
|000026c0| 6f 0d 29 3b 0d 47 65 74 | 43 65 72 74 49 6e 66 6f |o.);.Get|CertInfo|
|000026d0| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 74 6f 20 | can be |used to |
|000026e0| 69 74 65 72 61 74 65 20 | 74 68 72 6f 75 67 68 20 |iterate |through |
|000026f0| 74 68 65 20 63 65 72 74 | 69 66 69 63 61 74 65 73 |the cert|ificates|
|00002700| 20 74 68 61 74 20 6d 61 | 6b 65 20 75 70 20 61 20 | that ma|ke up a |
|00002710| 73 69 67 6e 61 74 75 72 | 65 2e 20 49 74 20 72 65 |signatur|e. It re|
|00002720| 74 75 72 6e 73 20 54 52 | 55 45 20 69 66 20 69 74 |turns TR|UE if it|
|00002730| 20 66 69 6e 64 73 20 61 | 20 63 65 72 74 69 66 69 | finds a| certifi|
|00002740| 63 61 74 65 20 66 6f 72 | 20 74 68 69 73 20 69 6e |cate for| this in|
|00002750| 64 65 78 2c 20 46 41 4c | 53 45 20 69 66 20 74 68 |dex, FAL|SE if th|
|00002760| 65 20 69 6e 64 65 78 20 | 69 73 20 6f 75 74 20 6f |e index |is out o|
|00002770| 66 20 72 61 6e 67 65 2c | 20 61 6e 64 20 66 61 69 |f range,| and fai|
|00002780| 6c 73 20 6f 6e 20 6f 74 | 68 65 72 20 65 72 72 6f |ls on ot|her erro|
|00002790| 72 73 2e 20 49 74 20 6d | 61 79 20 62 65 20 63 61 |rs. It m|ay be ca|
|000027a0| 6c 6c 65 64 20 6f 6e 6c | 79 20 61 66 74 65 72 20 |lled onl|y after |
|000027b0| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 20 73 69 67 |successf|ully sig|
|000027c0| 6e 69 6e 67 20 6f 72 20 | 76 65 72 69 66 79 69 6e |ning or |verifyin|
|000027d0| 67 20 61 6e 20 6f 62 6a | 65 63 74 20 6f 72 20 66 |g an obj|ect or f|
|000027e0| 69 6c 65 2e 0d 42 6f 6f | 6c 65 61 6e 09 09 09 47 |ile..Boo|lean...G|
|000027f0| 65 74 43 65 72 74 4e 61 | 6d 65 41 74 74 72 69 62 |etCertNa|meAttrib|
|00002800| 75 74 65 73 28 0d 09 75 | 6e 73 69 67 6e 65 64 20 |utes(..u|nsigned |
|00002810| 6c 6f 6e 67 09 09 63 65 | 72 74 49 6e 64 65 78 2c |long..ce|rtIndex,|
|00002820| 0d 09 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 09 |..unsign|ed long.|
|00002830| 09 61 74 74 72 69 62 75 | 74 65 49 6e 64 65 78 2c |.attribu|teIndex,|
|00002840| 0d 09 53 49 47 4e 61 6d | 65 41 74 74 72 69 62 75 |..SIGNam|eAttribu|
|00002850| 74 65 73 49 6e 66 6f 20 | 2a 61 74 74 72 69 62 75 |tesInfo |*attribu|
|00002860| 74 65 49 6e 66 6f 0d 29 | 3b 0d 47 65 74 43 65 72 |teInfo.)|;.GetCer|
|00002870| 74 49 6e 66 6f 20 63 61 | 6e 20 62 65 20 75 73 65 |tInfo ca|n be use|
|00002880| 64 20 74 6f 20 69 74 65 | 72 61 74 65 20 74 68 72 |d to ite|rate thr|
|00002890| 6f 75 67 68 20 74 68 65 | 20 61 74 74 72 69 62 75 |ough the| attribu|
|000028a0| 74 65 73 20 66 6f 72 20 | 61 20 63 65 72 74 69 66 |tes for |a certif|
|000028b0| 69 63 61 74 65 2e 20 49 | 74 20 72 65 74 75 72 6e |icate. I|t return|
|000028c0| 73 20 54 52 55 45 20 69 | 66 20 73 75 63 63 65 73 |s TRUE i|f succes|
|000028d0| 73 66 75 6c 2c 20 46 41 | 4c 53 45 20 69 66 20 74 |sful, FA|LSE if t|
|000028e0| 68 65 20 63 65 72 74 49 | 6e 64 65 78 20 69 73 20 |he certI|ndex is |
|000028f0| 6f 75 74 20 6f 66 20 72 | 61 6e 67 65 2c 20 61 6e |out of r|ange, an|
|00002900| 64 20 72 61 69 73 65 73 | 20 61 6e 20 65 72 72 6f |d raises| an erro|
|00002910| 72 20 63 6f 6e 64 69 74 | 69 6f 6e 20 6f 6e 20 6f |r condit|ion on o|
|00002920| 74 68 65 72 20 65 72 72 | 6f 72 73 2e 20 49 74 20 |ther err|ors. It |
|00002930| 6d 61 79 20 62 65 20 63 | 61 6c 6c 65 64 20 6f 6e |may be c|alled on|
|00002940| 6c 79 20 61 66 74 65 72 | 20 73 75 63 63 65 73 73 |ly after| success|
|00002950| 66 75 6c 6c 79 20 73 69 | 67 6e 69 6e 67 20 6f 72 |fully si|gning or|
|00002960| 20 76 65 72 69 66 79 69 | 6e 67 20 61 6e 20 6f 62 | verifyi|ng an ob|
|00002970| 6a 65 63 74 20 6f 72 20 | 66 69 6c 65 2e 0d 50 72 |ject or |file..Pr|
|00002980| 6f 74 65 63 74 65 64 20 | 4d 65 74 68 6f 64 73 0d |otected |Methods.|
|00002990| 76 6f 69 64 09 09 09 09 | 49 6e 69 74 44 65 66 61 |void....|InitDefa|
|000029a0| 75 6c 74 53 74 61 74 75 | 73 50 72 6f 63 28 0d 09 |ultStatu|sProc(..|
|000029b0| 43 6f 6e 73 74 53 74 72 | 32 35 35 50 61 72 61 6d |ConstStr|255Param|
|000029c0| 09 61 63 74 69 6f 6e 53 | 74 72 69 6e 67 2c 0d 09 |.actionS|tring,..|
|000029d0| 43 6f 6e 73 74 53 74 72 | 32 35 35 50 61 72 61 6d |ConstStr|255Param|
|000029e0| 09 6f 62 6a 65 63 74 53 | 74 72 69 6e 67 0d 29 3b |.objectS|tring.);|
|000029f0| 0d 54 68 69 73 20 69 73 | 20 63 61 6c 6c 65 64 20 |.This is| called |
|00002a00| 69 66 20 79 6f 75 20 70 | 61 73 73 20 67 53 49 47 |if you p|ass gSIG|
|00002a10| 53 74 61 74 75 73 50 72 | 6f 63 20 74 6f 20 53 69 |StatusPr|oc to Si|
|00002a20| 67 6e 46 69 6c 65 2c 20 | 56 65 72 69 66 79 46 69 |gnFile, |VerifyFi|
|00002a30| 6c 65 2c 20 65 74 63 2e | 20 49 74 20 63 72 65 61 |le, etc.| It crea|
|00002a40| 74 65 73 20 61 20 53 49 | 47 53 74 61 74 75 73 4d |tes a SI|GStatusM|
|00002a50| 61 6e 61 67 65 72 20 6f | 62 6a 65 63 74 20 77 68 |anager o|bject wh|
|00002a60| 69 63 68 20 64 69 73 70 | 6c 61 79 73 20 74 68 65 |ich disp|lays the|
|00002a70| 20 73 74 61 74 75 73 20 | 77 69 6e 64 6f 77 2e 0d | status |window..|
|00002a80| 76 6f 69 64 09 09 09 09 | 44 69 73 70 6f 73 65 44 |void....|DisposeD|
|00002a90| 65 66 61 75 6c 74 53 74 | 61 74 75 73 50 72 6f 63 |efaultSt|atusProc|
|00002aa0| 28 76 6f 69 64 29 0d 44 | 69 73 70 6f 73 65 20 6f |(void).D|ispose o|
|00002ab0| 66 20 74 68 65 20 73 74 | 61 74 75 73 20 77 69 6e |f the st|atus win|
|00002ac0| 64 6f 77 2e 0d 53 49 47 | 53 74 61 74 75 73 4d 61 |dow..SIG|StatusMa|
|00002ad0| 6e 61 67 65 72 0d 49 6e | 74 72 6f 64 75 63 74 69 |nager.In|troducti|
|00002ae0| 6f 6e 0d 53 49 47 53 74 | 61 74 75 73 4d 61 6e 61 |on.SIGSt|atusMana|
|00002af0| 67 65 72 20 6d 61 6e 61 | 67 65 73 20 74 68 65 20 |ger mana|ges the |
|00002b00| 73 74 61 74 75 73 20 77 | 69 6e 64 6f 77 20 74 68 |status w|indow th|
|00002b10| 61 74 20 69 73 20 64 69 | 73 70 6c 61 79 65 64 20 |at is di|splayed |
|00002b20| 77 68 65 6e 20 61 6e 20 | 61 70 70 6c 69 63 61 74 |when an |applicat|
|00002b30| 69 6f 6e 20 73 65 6c 65 | 63 74 73 20 74 68 65 20 |ion sele|cts the |
|00002b40| 64 65 66 61 75 6c 74 20 | 73 74 61 74 75 73 20 70 |default |status p|
|00002b50| 72 6f 63 65 64 75 72 65 | 2e 20 49 74 20 69 73 20 |rocedure|. It is |
|00002b60| 63 72 65 61 74 65 64 20 | 61 6e 64 20 6d 61 6e 61 |created |and mana|
|00002b70| 67 65 64 20 62 79 20 74 | 68 65 20 43 53 69 67 6e |ged by t|he CSign|
|00002b80| 61 74 75 72 65 20 69 6e | 73 74 61 6e 63 65 3a 20 |ature in|stance: |
|00002b90| 79 6f 75 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |your app|lication|
|00002ba0| 20 77 69 6c 6c 20 6e 6f | 72 6d 61 6c 6c 79 20 6e | will no|rmally n|
|00002bb0| 6f 74 20 62 65 20 63 6f | 6e 63 65 72 6e 65 64 20 |ot be co|ncerned |
|00002bc0| 77 69 74 68 20 69 74 2e | 0d 48 65 72 69 74 61 67 |with it.|.Heritag|
|00002bd0| 65 0d 53 75 70 65 72 63 | 6c 61 73 73 09 43 44 69 |e.Superc|lass.CDi|
|00002be0| 72 65 63 74 6f 72 0d 53 | 75 62 63 6c 61 73 73 65 |rector.S|ubclasse|
|00002bf0| 73 09 6e 6f 6e 65 0d 49 | 6e 73 74 61 6e 63 65 20 |s.none.I|nstance |
|00002c00| 56 61 72 69 61 62 6c 65 | 73 0d 56 61 72 69 61 62 |Variable|s.Variab|
|00002c10| 6c 65 09 54 79 70 65 09 | 44 65 73 63 72 69 70 74 |le.Type.|Descript|
|00002c20| 69 6f 6e 0d 69 74 73 54 | 69 63 6b 43 6f 75 6e 74 |ion.itsT|ickCount|
|00002c30| 09 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 09 54 |.unsigne|d long.T|
|00002c40| 68 69 73 20 69 73 20 75 | 73 65 64 20 74 6f 20 74 |his is u|sed to t|
|00002c50| 69 6d 65 20 74 68 65 20 | d2 62 61 72 62 65 72 20 |ime the |.barber |
|00002c60| 70 6f 6c 65 d3 20 70 72 | 6f 67 72 65 73 73 20 69 |pole. pr|ogress i|
|00002c70| 6e 64 69 63 61 74 6f 72 | 2e 0d 53 74 61 74 69 63 |ndicator|..Static|
|00002c80| 20 56 61 72 69 61 62 6c | 65 73 0d 56 61 72 69 61 | Variabl|es.Varia|
|00002c90| 62 6c 65 09 54 79 70 65 | 09 44 65 73 63 72 69 70 |ble.Type|.Descrip|
|00002ca0| 74 69 6f 6e 0d 67 43 6f | 6e 74 69 6e 75 65 53 69 |tion.gCo|ntinueSi|
|00002cb0| 67 6e 69 6e 67 20 42 6f | 6f 6c 65 61 6e 09 54 68 |gning Bo|olean.Th|
|00002cc0| 69 73 20 69 73 20 73 65 | 74 20 54 52 55 45 20 77 |is is se|t TRUE w|
|00002cd0| 68 65 6e 20 73 69 67 6e | 69 6e 67 20 62 65 67 69 |hen sign|ing begi|
|00002ce0| 6e 73 2c 20 61 6e 64 20 | 69 73 20 73 65 74 20 46 |ns, and |is set F|
|00002cf0| 41 4c 53 45 20 69 66 20 | 74 68 65 20 75 73 65 72 |ALSE if |the user|
|00002d00| 20 63 6c 69 63 6b 73 20 | 6f 6e 20 74 68 65 20 43 | clicks |on the C|
|00002d10| 61 6e 63 65 6c 20 62 75 | 74 74 6f 6e 2e 20 54 68 |ancel bu|tton. Th|
|00002d20| 65 20 76 61 6c 75 65 20 | 69 73 20 70 61 73 73 65 |e value |is passe|
|00002d30| 64 20 74 6f 20 74 68 65 | 20 44 69 67 69 74 61 6c |d to the| Digital|
|00002d40| 20 53 69 67 6e 61 74 75 | 72 65 20 4d 61 6e 61 67 | Signatu|re Manag|
|00002d50| 65 72 20 62 79 20 74 68 | 65 20 64 65 66 61 75 6c |er by th|e defaul|
|00002d60| 74 20 73 74 61 74 75 73 | 20 70 72 6f 63 65 64 75 |t status| procedu|
|00002d70| 72 65 2e 0d 4d 65 74 68 | 6f 64 73 0d 43 6f 6e 73 |re..Meth|ods.Cons|
|00002d80| 74 72 75 63 74 69 6f 6e | 20 61 6e 64 20 64 65 73 |truction| and des|
|00002d90| 74 72 75 63 74 69 6f 6e | 20 6d 65 74 68 6f 64 73 |truction| methods|
|00002da0| 0d 76 6f 69 64 09 09 09 | 09 49 53 49 47 53 74 61 |.void...|.ISIGSta|
|00002db0| 74 75 73 4d 61 6e 61 67 | 65 72 28 0d 09 43 6f 6e |tusManag|er(..Con|
|00002dc0| 73 74 53 74 72 32 35 35 | 50 61 72 61 6d 09 61 63 |stStr255|Param.ac|
|00002dd0| 74 69 6f 6e 53 74 72 69 | 6e 67 2c 0d 09 43 6f 6e |tionStri|ng,..Con|
|00002de0| 73 74 53 74 72 32 35 35 | 50 61 72 61 6d 09 6f 62 |stStr255|Param.ob|
|00002df0| 6a 65 63 74 53 74 72 69 | 6e 67 0d 29 3b 0d 43 72 |jectStri|ng.);.Cr|
|00002e00| 65 61 74 65 20 74 68 65 | 20 73 74 61 74 75 73 20 |eate the| status |
|00002e10| 77 69 6e 64 6f 77 20 28 | 74 68 69 73 20 75 73 65 |window (|this use|
|00002e20| 73 20 73 6f 6d 65 20 70 | 72 69 76 61 74 65 20 63 |s some p|rivate c|
|00002e30| 6c 61 73 73 65 73 20 74 | 68 61 74 20 61 72 65 20 |lasses t|hat are |
|00002e40| 64 65 66 69 6e 65 64 20 | 69 6e 20 53 49 47 53 74 |defined |in SIGSt|
|00002e50| 61 74 75 73 4d 61 6e 61 | 67 65 72 2e 63 29 2e 20 |atusMana|ger.c). |
|00002e60| 54 68 65 20 61 63 74 69 | 6f 6e 53 74 72 69 6e 67 |The acti|onString|
|00002e70| 20 61 6e 64 20 6f 62 6a | 65 63 74 53 74 72 69 6e | and obj|ectStrin|
|00002e80| 67 20 61 72 65 20 63 6f | 6e 63 61 74 65 6e 61 74 |g are co|ncatenat|
|00002e90| 65 64 20 61 6e 64 20 64 | 69 73 70 6c 61 79 65 64 |ed and d|isplayed|
|00002ea0| 20 69 6e 20 74 68 65 20 | 77 69 6e 64 6f 77 2e 20 | in the |window. |
|00002eb0| 54 68 65 73 65 20 6d 69 | 67 68 74 20 74 79 70 69 |These mi|ght typi|
|00002ec0| 63 61 6c 6c 79 20 62 65 | 20 d2 53 69 67 6e 69 6e |cally be| .Signin|
|00002ed0| 67 20 d2 20 d2 53 69 67 | 6e 65 64 20 46 69 6c 65 |g . .Sig|ned File|
|00002ee0| 2e d3 0d 4f 70 65 72 61 | 74 69 6f 6e 61 6c 20 6d |...Opera|tional m|
|00002ef0| 65 74 68 6f 64 73 0d 76 | 6f 69 64 09 09 09 09 44 |ethods.v|oid....D|
|00002f00| 6f 43 6f 6d 6d 61 6e 64 | 28 0d 09 6c 6f 6e 67 09 |oCommand|(..long.|
|00002f10| 09 09 09 61 43 6f 6d 6d | 61 6e 64 0d 29 3b 0d 54 |...aComm|and.);.T|
|00002f20| 68 65 20 73 74 61 74 75 | 73 20 77 69 6e 64 6f 77 |he statu|s window|
|00002f30| 20 68 61 73 20 61 20 63 | 61 6e 63 65 6c 20 62 75 | has a c|ancel bu|
|00002f40| 74 74 6f 6e 3a 20 6c 6f | 6f 6b 20 66 6f 72 20 69 |tton: lo|ok for i|
|00002f50| 74 20 61 6e 64 20 74 61 | 6b 65 20 61 70 70 72 6f |t and ta|ke appro|
|00002f60| 70 72 69 61 74 65 20 61 | 63 74 69 6f 6e 20 62 79 |priate a|ction by|
|00002f70| 20 73 65 74 74 69 6e 67 | 20 67 43 6f 6e 74 69 6e | setting| gContin|
|00002f80| 75 65 53 69 67 6e 69 6e | 67 20 46 41 4c 53 45 20 |ueSignin|g FALSE |
|00002f90| 61 6e 64 20 70 61 73 73 | 69 6e 67 20 74 68 65 20 |and pass|ing the |
|00002fa0| 63 61 6e 63 65 6c 20 63 | 6f 6d 6d 61 6e 64 20 74 |cancel c|ommand t|
|00002fb0| 6f 20 74 68 65 20 6d 61 | 6e 61 67 65 72 d5 73 20 |o the ma|nager.s |
|00002fc0| 73 75 70 65 72 63 6c 61 | 73 73 2e 0d 76 6f 69 64 |supercla|ss..void|
|00002fd0| 09 09 09 09 44 61 77 64 | 6c 65 28 0d 09 6c 6f 6e |....Dawd|le(..lon|
|00002fe0| 67 09 09 09 09 2a 6d 61 | 78 53 6c 65 65 70 0d 29 |g....*ma|xSleep.)|
|00002ff0| 3b 0d 54 43 4c 20 63 61 | 6c 6c 73 20 74 68 69 73 |;.TCL ca|lls this|
|00003000| 20 72 65 70 65 61 74 65 | 64 6c 79 20 74 6f 20 6d | repeate|dly to m|
|00003010| 61 6e 61 67 65 20 74 68 | 65 20 70 72 6f 67 72 65 |anage th|e progre|
|00003020| 73 73 20 69 6e 64 69 63 | 61 74 6f 72 2e 0d 43 53 |ss indic|ator..CS|
|00003030| 69 67 6e 65 64 4f 62 6a | 65 63 74 0d 49 6e 74 72 |ignedObj|ect.Intr|
|00003040| 6f 64 75 63 74 69 6f 6e | 0d 43 53 69 67 6e 65 64 |oduction|.CSigned|
|00003050| 4f 62 6a 65 63 74 20 6c | 65 74 73 20 79 6f 75 20 |Object l|ets you |
|00003060| 73 69 67 6e 20 61 6e 64 | 20 76 65 72 69 66 79 20 |sign and| verify |
|00003070| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |the cont|ents of |
|00003080| 61 6e 20 69 6e 64 69 76 | 69 64 75 61 6c 20 64 61 |an indiv|idual da|
|00003090| 74 61 20 6f 62 6a 65 63 | 74 2c 20 73 75 63 68 20 |ta objec|t, such |
|000030a0| 61 73 20 61 20 73 70 72 | 65 61 64 73 68 65 65 74 |as a spr|eadsheet|
|000030b0| 20 76 61 6c 75 65 20 6f | 72 20 74 68 65 20 70 6f | value o|r the po|
|000030c0| 73 69 74 69 6f 6e 20 6f | 66 20 61 6e 20 6f 62 6a |sition o|f an obj|
|000030d0| 65 63 74 20 69 6e 20 61 | 20 64 72 61 77 69 6e 67 |ect in a| drawing|
|000030e0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 2e 20 59 6f | applica|tion. Yo|
|000030f0| 75 20 63 61 6e 20 74 68 | 65 6e 20 73 74 6f 72 65 |u can th|en store|
|00003100| 20 61 6e 64 20 72 65 63 | 6f 76 65 72 20 74 68 65 | and rec|over the|
|00003110| 20 73 69 67 6e 61 74 75 | 72 65 20 72 65 63 6f 72 | signatu|re recor|
|00003120| 64 20 61 73 20 70 61 72 | 74 20 6f 66 20 79 6f 75 |d as par|t of you|
|00003130| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e d5 73 20 |r applic|ation.s |
|00003140| 6e 6f 72 6d 61 6c 20 73 | 74 6f 72 61 67 65 20 70 |normal s|torage p|
|00003150| 72 6f 63 65 73 73 2e 0d | 48 65 72 69 74 61 67 65 |rocess..|Heritage|
|00003160| 0d 53 75 70 65 72 63 6c | 61 73 73 09 43 53 69 67 |.Supercl|ass.CSig|
|00003170| 6e 61 74 75 72 65 0d 53 | 75 62 63 6c 61 73 73 65 |nature.S|ubclasse|
|00003180| 73 09 6e 6f 6e 65 0d 49 | 6e 73 74 61 6e 63 65 20 |s.none.I|nstance |
|00003190| 56 61 72 69 61 62 6c 65 | 73 0d 56 61 72 69 61 62 |Variable|s.Variab|
|000031a0| 6c 65 09 54 79 70 65 09 | 44 65 73 63 72 69 70 74 |le.Type.|Descript|
|000031b0| 69 6f 6e 0d 69 74 73 53 | 69 67 6e 61 74 75 72 65 |ion.itsS|ignature|
|000031c0| 09 53 49 47 53 69 67 6e | 61 74 75 72 65 50 74 72 |.SIGSign|aturePtr|
|000031d0| 09 54 68 65 20 73 69 67 | 6e 61 74 75 72 65 20 72 |.The sig|nature r|
|000031e0| 65 63 6f 72 64 2c 20 69 | 66 20 61 6e 79 2e 0d 69 |ecord, i|f any..i|
|000031f0| 74 73 53 69 67 6e 61 74 | 75 72 65 53 69 7a 65 09 |tsSignat|ureSize.|
|00003200| 53 69 7a 65 09 54 68 65 | 20 73 69 7a 65 20 6f 66 |Size.The| size of|
|00003210| 20 74 68 65 20 73 69 67 | 6e 61 74 75 72 65 20 72 | the sig|nature r|
|00003220| 65 63 6f 72 64 2e 0d 55 | 73 69 6e 67 20 43 53 69 |ecord..U|sing CSi|
|00003230| 67 6e 65 64 4f 62 6a 65 | 63 74 0d 59 6f 75 72 20 |gnedObje|ct.Your |
|00003240| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 73 68 6f 75 |applicat|ion shou|
|00003250| 6c 64 20 63 72 65 61 74 | 65 20 61 20 73 75 62 63 |ld creat|e a subc|
|00003260| 6c 61 73 73 20 6f 66 20 | 43 53 69 67 6e 65 64 4f |lass of |CSignedO|
|00003270| 62 6a 65 63 74 20 66 6f | 72 20 61 6c 6c 20 6f 62 |bject fo|r all ob|
|00003280| 6a 65 63 74 73 20 74 68 | 61 74 20 6e 65 65 64 20 |jects th|at need |
|00003290| 64 61 74 61 2d 73 70 65 | 63 69 66 69 63 20 73 69 |data-spe|cific si|
|000032a0| 67 6e 61 74 75 72 65 20 | 70 72 6f 63 65 73 73 69 |gnature |processi|
|000032b0| 6e 67 2e 0d 4d 65 74 68 | 6f 64 73 0d 45 78 63 65 |ng..Meth|ods.Exce|
|000032c0| 70 74 20 61 73 20 73 68 | 6f 77 6e 2c 20 61 6c 6c |pt as sh|own, all|
|000032d0| 20 6d 65 74 68 6f 64 73 | 20 75 73 65 20 74 68 65 | methods| use the|
|000032e0| 20 46 61 69 6c 75 72 65 | 20 6d 65 63 68 61 6e 69 | Failure| mechani|
|000032f0| 73 6d 20 28 61 73 20 64 | 65 73 63 72 69 62 65 64 |sm (as d|escribed|
|00003300| 20 69 6e 20 3c 45 78 63 | 65 70 74 69 6f 6e 73 2e | in <Exc|eptions.|
|00003310| 68 3e 20 74 6f 20 72 65 | 70 6f 72 74 20 65 72 72 |h> to re|port err|
|00003320| 6f 72 73 2e 20 49 6e 20 | 6d 6f 73 74 20 63 61 73 |ors. In |most cas|
|00003330| 65 73 2c 20 74 68 69 73 | 20 6d 65 61 6e 73 20 74 |es, this| means t|
|00003340| 68 61 74 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |hat your| applica|
|00003350| 74 69 6f 6e 20 6d 75 73 | 74 20 65 73 74 61 62 6c |tion mus|t establ|
|00003360| 69 73 68 20 61 20 54 52 | 59 2f 43 41 54 43 48 20 |ish a TR|Y/CATCH |
|00003370| 63 6f 6e 74 65 78 74 20 | 77 68 65 6e 20 63 61 6c |context |when cal|
|00003380| 6c 69 6e 67 20 74 68 65 | 73 65 20 6d 65 74 68 6f |ling the|se metho|
|00003390| 64 73 3a 0d 6b 53 49 47 | 55 73 65 72 43 61 6e 63 |ds:.kSIG|UserCanc|
|000033a0| 65 6c 65 64 09 54 68 65 | 20 75 73 65 72 20 63 61 |eled.The| user ca|
|000033b0| 6e 63 65 6c 6c 65 64 20 | 74 68 69 73 20 73 69 67 |ncelled |this sig|
|000033c0| 6e 20 6f 72 20 76 65 72 | 69 66 79 20 72 65 71 75 |n or ver|ify requ|
|000033d0| 65 73 74 2e 20 59 6f 75 | 20 6d 61 79 20 63 68 6f |est. You| may cho|
|000033e0| 6f 73 65 20 74 6f 20 69 | 67 6e 6f 72 65 20 74 68 |ose to i|gnore th|
|000033f0| 69 73 20 65 72 72 6f 72 | 2e 09 0d 6b 53 49 47 50 |is error|...kSIGP|
|00003400| 61 73 73 77 6f 72 64 45 | 72 72 09 54 68 65 20 75 |asswordE|rr.The u|
|00003410| 73 65 72 20 65 6e 74 65 | 72 65 64 20 61 6e 20 69 |ser ente|red an i|
|00003420| 6e 63 6f 72 72 65 63 74 | 20 70 61 73 73 77 6f 72 |ncorrect| passwor|
|00003430| 64 2e 09 0d 6b 53 49 47 | 53 69 67 6e 65 72 4e 6f |d...kSIG|SignerNo|
|00003440| 74 56 61 6c 69 64 45 72 | 72 09 54 68 65 20 73 69 |tValidEr|r.The si|
|00003450| 67 6e 65 72 20 66 69 6c | 65 20 69 73 20 6e 6f 74 |gner fil|e is not|
|00003460| 20 76 61 6c 69 64 3b 20 | 70 65 72 68 61 70 73 20 | valid; |perhaps |
|00003470| 69 74 20 68 61 73 20 65 | 78 70 69 72 65 64 2e 09 |it has e|xpired..|
|00003480| 0d 6b 53 49 47 4e 6f 53 | 69 67 6e 61 74 75 72 65 |.kSIGNoS|ignature|
|00003490| 09 50 72 6f 67 72 61 6d | 6d 69 6e 67 20 65 72 72 |.Program|ming err|
|000034a0| 6f 72 3a 20 79 6f 75 72 | 20 61 70 70 6c 69 63 61 |or: your| applica|
|000034b0| 74 69 6f 6e 20 63 61 6c | 6c 65 64 20 53 69 67 6e |tion cal|led Sign|
|000034c0| 20 6f 72 20 56 65 72 69 | 66 79 20 77 69 74 68 6f | or Veri|fy witho|
|000034d0| 75 74 20 68 61 76 69 6e | 67 20 63 61 6c 6c 65 64 |ut havin|g called|
|000034e0| 20 53 69 67 6e 50 72 65 | 70 61 72 65 20 6f 72 20 | SignPre|pare or |
|000034f0| 56 65 72 69 66 79 50 72 | 65 70 61 72 65 2e 09 0d |VerifyPr|epare...|
|00003500| 6b 53 49 47 56 65 72 69 | 66 79 46 61 69 6c 65 64 |kSIGVeri|fyFailed|
|00003510| 45 72 72 09 56 65 72 69 | 66 69 63 61 74 69 6f 6e |Err.Veri|fication|
|00003520| 20 66 61 69 6c 65 64 2e | 09 0d 6b 53 49 47 49 6e | failed.|..kSIGIn|
|00003530| 76 61 6c 69 64 43 72 65 | 64 65 6e 74 69 61 6c 45 |validCre|dentialE|
|00003540| 72 72 09 56 65 72 69 66 | 69 63 61 74 69 6f 6e 20 |rr.Verif|ication |
|00003550| 73 75 63 63 65 65 64 65 | 64 2c 20 62 75 74 20 63 |succeede|d, but c|
|00003560| 72 65 64 65 6e 74 69 61 | 6c 73 20 61 72 65 20 69 |redentia|ls are i|
|00003570| 6e 76 61 6c 69 64 3b 20 | 70 65 72 68 61 70 73 20 |nvalid; |perhaps |
|00003580| 74 68 65 79 20 68 61 76 | 65 20 65 78 70 69 72 65 |they hav|e expire|
|00003590| 64 2e 09 0d 6b 53 69 67 | 53 69 67 6e 65 72 45 72 |d...kSig|SignerEr|
|000035a0| 72 09 53 6f 6d 65 20 73 | 6f 72 74 20 6f 66 20 65 |r.Some s|ort of e|
|000035b0| 72 72 6f 72 20 77 69 74 | 68 20 74 68 65 20 73 69 |rror wit|h the si|
|000035c0| 67 6e 65 72 3a 20 74 68 | 65 20 73 69 67 6e 61 74 |gner: th|e signat|
|000035d0| 75 72 65 20 69 73 20 6e | 6f 74 20 76 61 6c 69 64 |ure is n|ot valid|
|000035e0| 2e 09 0d 20 43 6f 6e 73 | 74 72 75 63 74 69 6f 6e |... Cons|truction|
|000035f0| 20 61 6e 64 20 64 65 73 | 74 72 75 63 74 69 6f 6e | and des|truction|
|00003600| 20 6d 65 74 68 6f 64 73 | 0d 76 6f 69 64 09 09 09 | methods|.void...|
|00003610| 09 49 53 69 67 6e 65 64 | 4f 62 6a 65 63 74 28 76 |.ISigned|Object(v|
|00003620| 6f 69 64 29 3b 0d 49 6e | 69 74 69 61 6c 69 7a 65 |oid);.In|itialize|
|00003630| 20 74 68 65 20 70 72 69 | 76 61 74 65 20 76 61 72 | the pri|vate var|
|00003640| 69 61 62 6c 65 73 2e 0d | 76 6f 69 64 09 09 09 09 |iables..|void....|
|00003650| 44 69 73 70 6f 73 65 28 | 76 6f 69 64 29 3b 0d 44 |Dispose(|void);.D|
|00003660| 65 6c 65 74 65 20 61 6e | 79 20 63 6f 6e 74 65 78 |elete an|y contex|
|00003670| 74 20 61 6e 64 20 73 69 | 67 6e 61 74 75 72 65 20 |t and si|gnature |
|00003680| 61 6e 64 20 64 69 73 70 | 6f 73 65 20 6f 66 20 74 |and disp|ose of t|
|00003690| 68 65 20 43 53 69 67 6e | 61 74 75 72 65 20 6f 62 |he CSign|ature ob|
|000036a0| 6a 65 63 74 2e 0d 53 69 | 67 6e 69 6e 67 20 61 6e |ject..Si|gning an|
|000036b0| 64 20 56 65 72 69 66 79 | 69 6e 67 20 4d 65 74 68 |d Verify|ing Meth|
|000036c0| 6f 64 73 0d 53 69 7a 65 | 09 09 09 09 53 69 67 6e |ods.Size|....Sign|
|000036d0| 50 72 65 70 61 72 65 28 | 0d 09 63 6f 6e 73 74 20 |Prepare(|..const |
|000036e0| 46 53 53 70 65 63 09 09 | 2a 73 69 67 6e 65 72 46 |FSSpec..|*signerF|
|000036f0| 69 6c 65 2c 0d 09 43 6f | 6e 73 74 53 74 72 32 35 |ile,..Co|nstStr25|
|00003700| 35 50 61 72 61 6d 09 2a | 70 72 6f 6d 70 74 0d 29 |5Param.*|prompt.)|
|00003710| 3b 0d 4f 76 65 72 72 69 | 64 65 20 43 53 69 67 6e |;.Overri|de CSign|
|00003720| 61 74 75 72 65 3a 3a 53 | 69 67 6e 50 72 65 70 61 |ature::S|ignPrepa|
|00003730| 72 65 20 74 6f 20 73 74 | 6f 72 65 20 74 68 65 20 |re to st|ore the |
|00003740| 73 69 67 6e 61 74 75 72 | 65 20 73 69 7a 65 2e 0d |signatur|e size..|
|00003750| 76 6f 69 64 09 09 09 09 | 53 69 67 6e 28 0d 09 53 |void....|Sign(..S|
|00003760| 49 47 53 74 61 74 75 73 | 50 72 6f 63 50 74 72 09 |IGStatus|ProcPtr.|
|00003770| 73 74 61 74 75 73 50 72 | 6f 63 0d 29 3b 0d 53 69 |statusPr|oc.);.Si|
|00003780| 67 6e 20 63 6f 6d 70 6c | 65 74 65 73 20 74 68 65 |gn compl|etes the|
|00003790| 20 64 69 67 69 74 61 6c | 20 73 69 67 6e 61 74 75 | digital| signatu|
|000037a0| 72 65 20 70 72 6f 63 65 | 73 73 2e 20 54 6f 20 73 |re proce|ss. To s|
|000037b0| 69 67 6e 20 61 6e 20 6f | 62 6a 65 63 74 2c 20 79 |ign an o|bject, y|
|000037c0| 6f 75 20 73 68 6f 75 6c | 64 20 63 61 6c 6c 20 53 |ou shoul|d call S|
|000037d0| 69 67 6e 50 72 65 70 61 | 72 65 2c 20 50 72 6f 63 |ignPrepa|re, Proc|
|000037e0| 65 73 73 44 61 74 61 2c | 20 61 6e 64 20 74 68 65 |essData,| and the|
|000037f0| 6e 20 53 69 67 6e 2e 20 | 54 68 65 20 73 74 61 74 |n Sign. |The stat|
|00003800| 75 73 50 72 6f 63 2c 20 | 69 66 20 6e 6f 74 20 4e |usProc, |if not N|
|00003810| 55 4c 4c 2c 20 6d 61 79 | 20 62 65 20 75 73 65 64 |ULL, may| be used|
|00003820| 20 74 6f 20 69 6e 66 6f | 72 6d 20 74 68 65 20 75 | to info|rm the u|
|00003830| 73 65 72 20 74 68 61 74 | 20 61 20 73 69 67 6e 61 |ser that| a signa|
|00003840| 74 75 72 65 20 6f 70 65 | 72 61 74 69 6f 6e 20 69 |ture ope|ration i|
|00003850| 73 20 6f 63 63 75 72 72 | 69 6e 67 2e 20 20 45 72 |s occurr|ing. Er|
|00003860| 72 6f 72 73 20 61 72 65 | 20 72 65 70 6f 72 74 65 |rors are| reporte|
|00003870| 64 20 75 73 69 6e 67 20 | 74 68 65 20 46 61 69 6c |d using |the Fail|
|00003880| 75 72 65 20 6d 65 63 68 | 61 6e 69 73 6d 2e 0d 76 |ure mech|anism..v|
|00003890| 6f 69 64 09 09 09 09 56 | 65 72 69 66 79 50 72 65 |oid....V|erifyPre|
|000038a0| 70 61 72 65 28 0d 09 53 | 49 47 53 74 61 74 75 73 |pare(..S|IGStatus|
|000038b0| 50 72 6f 63 50 74 72 09 | 73 74 61 74 75 73 50 72 |ProcPtr.|statusPr|
|000038c0| 6f 63 0d 29 3b 0d 42 65 | 67 69 6e 20 74 68 65 20 |oc.);.Be|gin the |
|000038d0| 70 72 6f 63 65 73 73 20 | 6f 66 20 76 65 72 69 66 |process |of verif|
|000038e0| 79 69 6e 67 20 61 20 64 | 69 67 69 74 61 6c 20 73 |ying a d|igital s|
|000038f0| 69 67 6e 61 74 75 72 65 | 20 70 72 6f 63 65 73 73 |ignature| process|
|00003900| 2e 20 54 6f 20 76 65 72 | 69 66 79 20 61 6e 20 6f |. To ver|ify an o|
|00003910| 62 6a 65 63 74 2c 20 79 | 6f 75 20 73 68 6f 75 6c |bject, y|ou shoul|
|00003920| 64 20 63 61 6c 6c 20 56 | 65 72 69 66 79 50 72 65 |d call V|erifyPre|
|00003930| 70 61 72 65 2c 20 50 72 | 6f 63 65 73 73 44 61 74 |pare, Pr|ocessDat|
|00003940| 61 2c 20 74 68 65 6e 20 | 56 65 72 69 66 79 2e 20 |a, then |Verify. |
|00003950| 45 72 72 6f 72 73 20 61 | 72 65 20 72 65 70 6f 72 |Errors a|re repor|
|00003960| 74 65 64 20 75 73 69 6e | 67 20 74 68 65 20 46 61 |ted usin|g the Fa|
|00003970| 69 6c 75 72 65 20 6d 65 | 63 68 61 6e 69 73 6d 2e |ilure me|chanism.|
|00003980| 0d 76 6f 69 64 09 09 09 | 09 56 65 72 69 66 79 28 |.void...|.Verify(|
|00003990| 76 6f 69 64 29 3b 0d 56 | 65 72 69 66 79 20 63 6f |void);.V|erify co|
|000039a0| 6d 70 6c 65 74 65 73 20 | 74 68 65 20 64 69 67 69 |mpletes |the digi|
|000039b0| 74 61 6c 20 73 69 67 6e | 61 74 75 72 65 20 76 65 |tal sign|ature ve|
|000039c0| 72 69 66 69 63 61 74 69 | 6f 6e 2e 20 45 72 72 6f |rificati|on. Erro|
|000039d0| 72 73 20 61 72 65 20 72 | 65 70 6f 72 74 65 64 20 |rs are r|eported |
|000039e0| 75 73 69 6e 67 20 74 68 | 65 20 46 61 69 6c 75 72 |using th|e Failur|
|000039f0| 65 20 6d 65 63 68 61 6e | 69 73 6d 2e 0d 76 6f 69 |e mechan|ism..voi|
|00003a00| 64 09 09 09 09 50 72 6f | 63 65 73 73 44 61 74 61 |d....Pro|cessData|
|00003a10| 28 0d 09 63 6f 6e 73 74 | 20 76 6f 69 64 09 09 2a |(..const| void..*|
|00003a20| 64 61 74 61 50 74 72 2c | 0d 09 53 69 7a 65 09 09 |dataPtr,|..Size..|
|00003a30| 09 09 64 61 74 61 53 69 | 7a 65 0d 29 3b 0d 43 6f |..dataSi|ze.);.Co|
|00003a40| 6d 70 75 74 65 20 6f 72 | 20 76 65 72 69 66 79 20 |mpute or| verify |
|00003a50| 61 20 44 69 67 69 74 61 | 6c 20 53 69 67 6e 61 74 |a Digita|l Signat|
|00003a60| 75 72 65 2e 20 54 68 69 | 73 20 69 73 20 63 61 6c |ure. Thi|s is cal|
|00003a70| 6c 65 64 20 66 6f 72 20 | 61 6c 6c 20 64 61 74 61 |led for |all data|
|00003a80| 20 65 6c 65 6d 65 6e 74 | 73 2e 20 0d 53 69 67 6e | element|s. .Sign|
|00003a90| 61 74 75 72 65 20 4d 65 | 74 68 6f 64 73 0d 53 69 |ature Me|thods.Si|
|00003aa0| 7a 65 09 09 09 09 47 65 | 74 53 69 67 6e 61 74 75 |ze....Ge|tSignatu|
|00003ab0| 72 65 53 69 7a 65 28 76 | 6f 69 64 29 3b 0d 52 65 |reSize(v|oid);.Re|
|00003ac0| 74 75 72 6e 20 74 68 65 | 20 73 69 7a 65 20 6f 66 |turn the| size of|
|00003ad0| 20 74 68 65 20 73 69 67 | 6e 61 74 75 72 65 20 72 | the sig|nature r|
|00003ae0| 65 63 6f 72 64 2c 20 61 | 73 20 73 70 65 63 69 66 |ecord, a|s specif|
|00003af0| 69 65 64 d1 6f 72 69 67 | 69 6e 61 6c 6c 79 d1 62 |ied.orig|inally.b|
|00003b00| 79 20 53 69 67 6e 50 72 | 65 70 61 72 65 2e 0d 76 |y SignPr|epare..v|
|00003b10| 6f 69 64 09 09 09 09 4e | 65 77 53 69 67 6e 61 74 |oid....N|ewSignat|
|00003b20| 75 72 65 28 76 6f 69 64 | 29 3b 0d 43 72 65 61 74 |ure(void|);.Creat|
|00003b30| 65 20 61 20 73 69 67 6e | 61 74 75 72 65 20 72 65 |e a sign|ature re|
|00003b40| 63 6f 72 64 20 75 73 69 | 6e 67 20 74 68 65 20 63 |cord usi|ng the c|
|00003b50| 75 72 72 65 6e 74 6c 79 | 2d 73 70 65 63 69 66 69 |urrently|-specifi|
|00003b60| 65 64 20 73 69 7a 65 2e | 0d 76 6f 69 64 09 09 09 |ed size.|.void...|
|00003b70| 09 44 69 73 70 6f 73 65 | 53 69 67 6e 61 74 75 72 |.Dispose|Signatur|
|00003b80| 65 28 76 6f 69 64 29 3b | 0d 44 69 73 70 6f 73 65 |e(void);|.Dispose|
|00003b90| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|00003ba0| 73 69 67 6e 61 74 75 72 | 65 20 62 75 66 66 65 72 |signatur|e buffer|
|00003bb0| 2c 20 69 66 20 61 6e 79 | 2c 20 62 75 74 20 64 6f |, if any|, but do|
|00003bc0| 20 6e 6f 74 20 64 69 73 | 70 6f 73 65 20 6f 66 20 | not dis|pose of |
|00003bd0| 74 68 65 20 63 6f 6e 74 | 65 78 74 2e 0d 42 6f 6f |the cont|ext..Boo|
|00003be0| 6c 65 61 6e 09 09 09 48 | 61 73 53 69 67 6e 61 74 |lean...H|asSignat|
|00003bf0| 75 72 65 28 76 6f 69 64 | 29 3b 0d 52 65 74 75 72 |ure(void|);.Retur|
|00003c00| 6e 20 54 52 55 45 20 69 | 66 20 74 68 65 72 65 20 |n TRUE i|f there |
|00003c10| 69 73 20 61 20 63 75 72 | 72 65 6e 74 20 73 69 67 |is a cur|rent sig|
|00003c20| 6e 61 74 75 72 65 2e 0d | 76 6f 69 64 09 09 09 09 |nature..|void....|
|00003c30| 43 68 65 63 6b 46 6f 72 | 53 69 67 6e 61 74 75 72 |CheckFor|Signatur|
|00003c40| 65 28 76 6f 69 64 29 3b | 0d 46 61 69 6c 20 77 69 |e(void);|.Fail wi|
|00003c50| 74 68 20 61 6e 20 65 72 | 72 6f 72 20 28 6b 53 49 |th an er|ror (kSI|
|00003c60| 47 4e 6f 53 69 67 6e 61 | 74 75 72 65 29 20 69 66 |GNoSigna|ture) if|
|00003c70| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00003c80| 20 68 61 73 6e d5 74 20 | 65 73 74 61 62 6c 69 73 | hasn.t |establis|
|00003c90| 68 65 64 20 61 20 73 69 | 67 6e 61 74 75 72 65 20 |hed a si|gnature |
|00003ca0| 72 65 63 6f 72 64 2e 0d | 76 6f 69 64 09 09 09 09 |record..|void....|
|00003cb0| 43 6f 70 79 53 69 67 6e | 61 74 75 72 65 54 6f 55 |CopySign|atureToU|
|00003cc0| 73 65 72 42 75 66 66 65 | 72 28 0d 09 76 6f 69 64 |serBuffe|r(..void|
|00003cd0| 09 09 09 09 2a 62 75 66 | 66 65 72 2c 0d 09 53 69 |....*buf|fer,..Si|
|00003ce0| 7a 65 09 09 09 09 62 75 | 66 66 65 72 53 69 7a 65 |ze....bu|fferSize|
|00003cf0| 0d 29 3b 0d 43 6f 70 79 | 20 74 68 65 20 63 75 72 |.);.Copy| the cur|
|00003d00| 72 65 6e 74 20 73 69 67 | 6e 61 74 75 72 65 20 74 |rent sig|nature t|
|00003d10| 6f 20 74 68 65 20 75 73 | 65 72 d5 73 20 62 75 66 |o the us|er.s buf|
|00003d20| 66 65 72 2e 20 42 75 66 | 66 65 72 53 69 7a 65 20 |fer. Buf|ferSize |
|00003d30| 69 73 20 74 68 65 20 73 | 69 7a 65 20 6f 66 20 74 |is the s|ize of t|
|00003d40| 68 65 20 75 73 65 72 d5 | 73 20 62 75 66 66 65 72 |he user.|s buffer|
|00003d50| 3b 20 61 20 70 61 72 61 | 6d 45 72 72 20 65 72 72 |; a para|mErr err|
|00003d60| 6f 72 20 63 6f 6e 64 69 | 74 69 6f 6e 20 77 69 6c |or condi|tion wil|
|00003d70| 6c 20 62 65 20 72 61 69 | 73 65 64 20 69 66 20 62 |l be rai|sed if b|
|00003d80| 75 66 66 65 72 53 69 7a | 65 20 63 61 6e 6e 6f 74 |ufferSiz|e cannot|
|00003d90| 20 68 6f 6c 64 20 74 68 | 65 20 65 6e 74 69 72 65 | hold th|e entire|
|00003da0| 20 73 69 67 6e 61 74 75 | 72 65 2e 0d 76 6f 69 64 | signatu|re..void|
|00003db0| 09 09 09 09 4d 61 6b 65 | 53 69 67 6e 61 74 75 72 |....Make|Signatur|
|00003dc0| 65 46 72 6f 6d 55 73 65 | 72 42 75 66 66 65 72 28 |eFromUse|rBuffer(|
|00003dd0| 0d 09 76 6f 69 64 09 09 | 09 09 2a 62 75 66 66 65 |..void..|..*buffe|
|00003de0| 72 2c 0d 09 53 69 7a 65 | 09 09 09 09 62 75 66 66 |r,..Size|....buff|
|00003df0| 65 72 53 69 7a 65 0d 29 | 3b 0d 43 72 65 61 74 65 |erSize.)|;.Create|
|00003e00| 20 61 20 73 69 67 6e 61 | 74 75 72 65 20 72 65 63 | a signa|ture rec|
|00003e10| 6f 72 64 20 75 73 69 6e | 67 20 74 68 65 20 69 6e |ord usin|g the in|
|00003e20| 66 6f 72 6d 61 74 69 6f | 6e 20 69 6e 20 74 68 65 |formatio|n in the|
|00003e30| 20 75 73 65 72 d5 73 20 | 62 75 66 66 65 72 2e 20 | user.s |buffer. |
|00003e40| 43 6f 70 79 53 69 67 6e | 61 74 75 72 65 54 6f 55 |CopySign|atureToU|
|00003e50| 73 65 72 42 75 66 66 65 | 72 20 61 6e 64 20 4d 61 |serBuffe|r and Ma|
|00003e60| 6b 65 53 69 67 6e 61 74 | 75 72 65 46 72 6f 6d 55 |keSignat|ureFromU|
|00003e70| 73 65 72 42 75 66 66 65 | 72 20 6d 61 79 20 62 65 |serBuffe|r may be|
|00003e80| 20 75 73 65 64 20 74 6f | 67 65 74 68 65 72 20 74 | used to|gether t|
|00003e90| 6f 20 73 61 76 65 20 61 | 6e 64 20 72 65 73 74 6f |o save a|nd resto|
|00003ea0| 72 65 20 6f 62 6a 65 63 | 74 20 73 69 67 6e 61 74 |re objec|t signat|
|00003eb0| 75 72 65 73 2e 0d 76 6f | 69 64 09 09 09 09 52 65 |ures..vo|id....Re|
|00003ec0| 61 64 53 69 67 6e 61 74 | 75 72 65 28 0d 09 43 44 |adSignat|ure(..CD|
|00003ed0| 61 74 61 46 69 6c 65 09 | 09 09 2a 61 46 69 6c 65 |ataFile.|..*aFile|
|00003ee0| 0d 29 3b 0d 52 65 61 64 | 20 61 20 73 69 67 6e 61 |.);.Read| a signa|
|00003ef0| 74 75 72 65 20 72 65 63 | 6f 72 64 20 66 72 6f 6d |ture rec|ord from|
|00003f00| 20 74 68 65 20 69 6e 64 | 69 63 61 74 65 64 20 66 | the ind|icated f|
|00003f10| 69 6c 65 2e 20 49 66 20 | 61 20 6e 6f 6e 2d 6e 75 |ile. If |a non-nu|
|00003f20| 6c 6c 20 73 69 67 6e 61 | 74 75 72 65 20 77 61 73 |ll signa|ture was|
|00003f30| 20 72 65 61 64 2c 20 63 | 72 65 61 74 65 20 69 74 | read, c|reate it|
|00003f40| 20 66 72 6f 6d 20 74 68 | 65 20 67 69 76 65 6e 20 | from th|e given |
|00003f50| 64 61 74 61 2e 20 54 68 | 65 20 61 63 74 75 61 6c |data. Th|e actual|
|00003f60| 20 64 61 74 61 20 69 6e | 63 6c 75 64 65 73 20 61 | data in|cludes a|
|00003f70| 20 68 65 61 64 65 72 20 | 72 65 63 6f 72 64 20 74 | header |record t|
|00003f80| 68 61 74 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |hat indi|cates th|
|00003f90| 61 74 20 74 68 65 20 64 | 61 74 61 20 69 73 20 61 |at the d|ata is a|
|00003fa0| 20 73 69 67 6e 61 74 75 | 72 65 20 61 6e 64 20 73 | signatu|re and s|
|00003fb0| 70 65 63 69 66 69 65 73 | 20 69 74 73 20 6c 65 6e |pecifies| its len|
|00003fc0| 67 74 68 2e 0d 76 6f 69 | 64 09 09 09 09 57 72 69 |gth..voi|d....Wri|
|00003fd0| 74 65 53 69 67 6e 61 74 | 75 72 65 28 0d 09 43 44 |teSignat|ure(..CD|
|00003fe0| 61 74 61 46 69 6c 65 09 | 09 09 2a 61 46 69 6c 65 |ataFile.|..*aFile|
|00003ff0| 0d 29 3b 0d 57 72 69 74 | 65 20 61 20 73 69 67 6e |.);.Writ|e a sign|
|00004000| 61 74 75 72 65 20 74 6f | 20 61 6e 20 6f 70 65 6e |ature to| an open|
|00004010| 20 66 69 6c 65 2e 20 54 | 68 69 73 20 6d 69 67 68 | file. T|his migh|
|00004020| 74 20 62 65 20 63 61 6c | 6c 65 64 20 61 73 20 70 |t be cal|led as p|
|00004030| 61 72 74 20 6f 66 20 79 | 6f 75 72 20 d2 73 61 76 |art of y|our .sav|
|00004040| 65 20 74 68 69 73 20 6f | 62 6a 65 63 74 d3 20 70 |e this o|bject. p|
|00004050| 72 6f 63 65 73 73 2e 20 | 61 46 69 6c 65 20 69 73 |rocess. |aFile is|
|00004060| 20 61 20 54 43 4c 20 64 | 61 74 61 20 66 69 6c 65 | a TCL d|ata file|
|00004070| 2e 20 54 68 69 73 20 61 | 6c 73 6f 20 77 72 69 74 |. This a|lso writ|
|00004080| 65 73 20 61 20 68 65 61 | 64 65 72 20 72 65 63 6f |es a hea|der reco|
|00004090| 72 64 20 77 69 74 68 20 | 74 68 65 20 73 69 67 6e |rd with |the sign|
|000040a0| 61 74 75 72 65 20 6c 65 | 6e 67 74 68 3a 20 69 66 |ature le|ngth: if|
|000040b0| 20 69 74 20 69 73 20 63 | 61 6c 6c 65 64 20 77 68 | it is c|alled wh|
|000040c0| 65 6e 20 74 68 65 72 65 | 20 6e 6f 20 73 69 67 6e |en there| no sign|
|000040d0| 61 74 75 72 65 20 72 65 | 63 6f 72 64 2c 20 69 74 |ature re|cord, it|
|000040e0| 20 77 69 6c 6c 20 77 72 | 69 74 65 20 61 20 7a 65 | will wr|ite a ze|
|000040f0| 72 6f 2d 6c 65 6e 67 74 | 68 20 72 65 63 6f 72 64 |ro-lengt|h record|
|00004100| 20 74 68 61 74 20 52 65 | 61 64 53 69 67 6e 61 74 | that Re|adSignat|
|00004110| 75 72 65 20 63 6f 72 72 | 65 63 74 6c 79 20 69 6e |ure corr|ectly in|
|00004120| 74 65 72 70 72 65 74 73 | 2e 0d 43 53 69 67 6e 65 |terprets|..CSigne|
|00004130| 64 44 61 74 61 46 69 6c | 65 0d 49 6e 74 72 6f 64 |dDataFil|e.Introd|
|00004140| 75 63 74 69 6f 6e 0d 43 | 53 69 67 6e 65 64 44 61 |uction.C|SignedDa|
|00004150| 74 61 46 69 6c 65 20 6c | 65 74 73 20 79 6f 75 20 |taFile l|ets you |
|00004160| 73 69 67 6e 20 61 6e 64 | 20 76 65 72 69 66 79 20 |sign and| verify |
|00004170| 74 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |the cont|ents of |
|00004180| 61 6e 20 65 6e 74 69 72 | 65 20 66 69 6c 65 2e 0d |an entir|e file..|
|00004190| 48 65 72 69 74 61 67 65 | 0d 53 75 70 65 72 63 6c |Heritage|.Supercl|
|000041a0| 61 73 73 09 43 53 69 67 | 6e 61 74 75 72 65 0d 53 |ass.CSig|nature.S|
|000041b0| 75 62 63 6c 61 73 73 65 | 73 09 6e 6f 6e 65 0d 55 |ubclasse|s.none.U|
|000041c0| 73 69 6e 67 20 43 53 69 | 67 6e 65 64 44 61 74 61 |sing CSi|gnedData|
|000041d0| 46 69 6c 65 0d 55 73 65 | 20 74 68 69 73 20 61 73 |File.Use| this as|
|000041e0| 20 70 61 72 74 20 6f 66 | 20 79 6f 75 72 20 61 70 | part of| your ap|
|000041f0| 70 6c 69 63 61 74 69 6f | 6e d5 73 20 4f 70 65 6e |plicatio|n.s Open|
|00004200| 20 61 6e 64 20 43 6c 6f | 73 65 20 64 6f 63 75 6d | and Clo|se docum|
|00004210| 65 6e 74 20 70 72 6f 63 | 65 73 73 69 6e 67 2e 0d |ent proc|essing..|
|00004220| 4d 65 74 68 6f 64 73 0d | 45 78 63 65 70 74 20 61 |Methods.|Except a|
|00004230| 73 20 73 68 6f 77 6e 2c | 20 61 6c 6c 20 6d 65 74 |s shown,| all met|
|00004240| 68 6f 64 73 20 75 73 65 | 20 74 68 65 20 46 61 69 |hods use| the Fai|
|00004250| 6c 75 72 65 20 6d 65 63 | 68 61 6e 69 73 6d 20 28 |lure mec|hanism (|
|00004260| 61 73 20 64 65 73 63 72 | 69 62 65 64 20 69 6e 20 |as descr|ibed in |
|00004270| 3c 45 78 63 65 70 74 69 | 6f 6e 73 2e 68 3e 20 74 |<Excepti|ons.h> t|
|00004280| 6f 20 72 65 70 6f 72 74 | 20 65 72 72 6f 72 73 2e |o report| errors.|
|00004290| 20 49 6e 20 63 65 72 74 | 61 69 6e 20 63 61 73 65 | In cert|ain case|
|000042a0| 73 2c 20 74 68 69 73 20 | 6d 65 61 6e 73 20 74 68 |s, this |means th|
|000042b0| 61 74 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |at your |applicat|
|000042c0| 69 6f 6e 20 6d 75 73 74 | 20 65 73 74 61 62 6c 69 |ion must| establi|
|000042d0| 73 68 20 61 20 54 52 59 | 2f 43 41 54 43 48 20 63 |sh a TRY|/CATCH c|
|000042e0| 6f 6e 74 65 78 74 20 77 | 68 65 6e 20 63 61 6c 6c |ontext w|hen call|
|000042f0| 69 6e 67 20 74 68 65 73 | 65 20 6d 65 74 68 6f 64 |ing thes|e method|
|00004300| 73 2e 09 0d 43 6f 6e 73 | 74 72 75 63 74 69 6f 6e |s...Cons|truction|
|00004310| 20 61 6e 64 20 64 65 73 | 74 72 75 63 74 69 6f 6e | and des|truction|
|00004320| 20 6d 65 74 68 6f 64 73 | 0d 76 6f 69 64 09 09 09 | methods|.void...|
|00004330| 09 49 53 69 67 6e 65 64 | 44 61 74 61 46 69 6c 65 |.ISigned|DataFile|
|00004340| 28 76 6f 69 64 29 3b 0d | 49 6e 69 74 61 6c 69 7a |(void);.|Initaliz|
|00004350| 65 20 74 68 65 20 6f 62 | 6a 65 63 74 20 69 6e 73 |e the ob|ject ins|
|00004360| 74 61 6e 63 65 2e 0d 76 | 6f 69 64 09 09 09 09 53 |tance..v|oid....S|
|00004370| 69 67 6e 46 69 6c 65 28 | 0d 09 63 6f 6e 73 74 20 |ignFile(|..const |
|00004380| 46 53 53 70 65 63 09 09 | 2a 73 69 67 6e 65 72 46 |FSSpec..|*signerF|
|00004390| 69 6c 65 2c 0d 09 43 6f | 6e 73 74 53 74 72 32 35 |ile,..Co|nstStr25|
|000043a0| 35 50 61 72 61 6d 09 70 | 72 6f 6d 70 74 53 74 72 |5Param.p|romptStr|
|000043b0| 69 6e 67 2c 0d 09 63 6f | 6e 73 74 20 46 53 53 70 |ing,..co|nst FSSp|
|000043c0| 65 63 09 09 2a 64 61 74 | 61 46 69 6c 65 2c 0d 09 |ec..*dat|aFile,..|
|000043d0| 53 49 47 53 74 61 74 75 | 73 50 72 6f 63 50 74 72 |SIGStatu|sProcPtr|
|000043e0| 09 73 74 61 74 75 73 50 | 72 6f 63 0d 29 3b 0d 53 |.statusP|roc.);.S|
|000043f0| 69 67 6e 20 74 68 65 20 | 66 69 6c 65 20 73 70 65 |ign the |file spe|
|00004400| 63 69 66 69 65 64 20 62 | 79 20 64 61 74 61 46 69 |cified b|y dataFi|
|00004410| 6c 65 2e 20 49 66 20 73 | 69 67 6e 65 72 46 69 6c |le. If s|ignerFil|
|00004420| 65 20 69 73 20 6e 6f 74 | 20 4e 55 4c 4c 2c 20 69 |e is not| NULL, i|
|00004430| 74 20 77 69 6c 6c 20 62 | 65 20 75 73 65 64 20 74 |t will b|e used t|
|00004440| 6f 20 64 65 66 69 6e 65 | 20 74 68 65 20 73 69 67 |o define| the sig|
|00004450| 6e 65 72 20 66 69 6c 65 | 2c 20 77 68 69 6c 65 20 |ner file|, while |
|00004460| 69 66 20 4e 55 4c 4c 2c | 20 74 68 65 20 74 6f 6f |if NULL,| the too|
|00004470| 6c 62 6f 78 20 77 69 6c | 6c 20 70 72 6f 6d 70 74 |lbox wil|l prompt|
|00004480| 20 66 6f 72 20 74 68 65 | 20 75 73 65 72 d5 73 20 | for the| user.s |
|00004490| 73 69 67 6e 65 72 20 66 | 69 6c 65 2e 20 50 72 6f |signer f|ile. Pro|
|000044a0| 6d 70 74 20 69 73 20 75 | 73 65 64 20 74 6f 20 70 |mpt is u|sed to p|
|000044b0| 72 6f 6d 70 74 20 74 68 | 65 20 75 73 65 72 20 66 |rompt th|e user f|
|000044c0| 6f 72 20 61 20 73 69 67 | 6e 65 72 20 66 69 6c 65 |or a sig|ner file|
|000044d0| 2c 20 69 66 20 22 5c 70 | 22 2c 20 74 68 65 20 64 |, if "\p|", the d|
|000044e0| 65 66 61 75 6c 74 20 70 | 72 6f 6d 70 74 20 77 69 |efault p|rompt wi|
|000044f0| 6c 6c 20 62 65 20 75 73 | 65 64 2e 20 53 69 67 6e |ll be us|ed. Sign|
|00004500| 50 72 65 70 61 72 65 20 | 72 65 74 75 72 6e 73 20 |Prepare |returns |
|00004510| 74 68 65 20 73 69 7a 65 | 20 6f 66 20 74 68 65 20 |the size| of the |
|00004520| 53 69 67 6e 61 74 75 72 | 65 20 72 65 63 6f 72 64 |Signatur|e record|
|00004530| 2e 20 53 74 61 74 75 73 | 50 72 6f 63 20 64 65 66 |. Status|Proc def|
|00004540| 69 6e 65 73 20 74 68 65 | 20 75 73 65 72 20 73 74 |ines the| user st|
|00004550| 61 74 75 73 20 70 72 6f | 63 65 64 75 72 65 2e 20 |atus pro|cedure. |
|00004560| 55 73 65 20 67 53 49 47 | 53 74 61 74 75 73 50 72 |Use gSIG|StatusPr|
|00004570| 6f 63 20 66 6f 72 20 74 | 68 65 20 64 65 66 61 75 |oc for t|he defau|
|00004580| 6c 74 20 77 69 6e 64 6f | 77 2e 20 0d 42 65 63 61 |lt windo|w. .Beca|
|00004590| 75 73 65 20 6f 66 20 74 | 68 65 20 77 61 79 20 74 |use of t|he way t|
|000045a0| 68 65 20 54 68 69 6e 6b | 20 43 6c 61 73 73 20 4c |he Think| Class L|
|000045b0| 69 62 72 61 72 79 20 63 | 6c 6f 73 65 73 20 66 69 |ibrary c|loses fi|
|000045c0| 6c 65 73 2c 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |les, you| should |
|000045d0| 63 61 6c 6c 20 53 69 67 | 6e 46 69 6c 65 20 69 6e |call Sig|nFile in|
|000045e0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 73 | the fol|lowing s|
|000045f0| 65 71 75 65 6e 63 65 3a | 0d 31 09 43 72 65 61 74 |equence:|.1.Creat|
|00004600| 65 20 61 20 63 6f 70 79 | 20 6f 66 20 74 68 65 20 |e a copy| of the |
|00004610| 46 53 53 70 65 63 20 61 | 73 73 6f 63 69 61 74 65 |FSSpec a|ssociate|
|00004620| 64 20 77 69 74 68 20 74 | 68 65 20 66 69 6c 65 2e |d with t|he file.|
|00004630| 0d 32 09 57 72 69 74 65 | 20 61 6c 6c 20 64 61 74 |.2.Write| all dat|
|00004640| 61 20 61 6e 64 20 63 6c | 6f 73 65 20 74 68 65 20 |a and cl|ose the |
|00004650| 66 69 6c 65 2e 20 59 6f | 75 20 63 61 6e 20 64 65 |file. Yo|u can de|
|00004660| 6c 65 74 65 20 74 68 65 | 20 43 44 61 74 61 46 69 |lete the| CDataFi|
|00004670| 6c 65 20 6f 62 6a 65 63 | 74 20 61 74 20 74 68 69 |le objec|t at thi|
|00004680| 73 20 74 69 6d 65 2e 0d | 33 09 53 69 67 6e 46 69 |s time..|3.SignFi|
|00004690| 6c 65 20 75 73 69 6e 67 | 20 74 68 65 20 73 61 76 |le using| the sav|
|000046a0| 65 64 20 46 53 53 70 65 | 63 2e 0d 34 09 43 61 6c |ed FSSpe|c..4.Cal|
|000046b0| 6c 20 44 69 73 70 6f 73 | 65 53 69 67 6e 65 72 43 |l Dispos|eSignerC|
|000046c0| 6f 6e 74 65 78 74 0d 59 | 6f 75 20 73 68 6f 75 6c |ontext.Y|ou shoul|
|000046d0| 64 20 63 61 6c 6c 20 53 | 69 67 6e 50 72 65 70 61 |d call S|ignPrepa|
|000046e0| 72 65 c9 53 69 67 6e 46 | 69 6c 65 20 69 6e 20 61 |re.SignF|ile in a|
|000046f0| 20 54 52 59 2f 43 41 54 | 43 48 20 63 6f 6e 74 65 | TRY/CAT|CH conte|
|00004700| 78 74 2c 20 63 68 65 63 | 6b 69 6e 67 20 66 6f 72 |xt, chec|king for|
|00004710| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 65 | the fol|lowing e|
|00004720| 72 72 6f 72 73 3a 0d 6b | 53 49 47 55 73 65 72 43 |rrors:.k|SIGUserC|
|00004730| 61 6e 63 65 6c 65 64 09 | 54 68 65 20 75 73 65 72 |anceled.|The user|
|00004740| 20 63 61 6e 63 65 6c 6c | 65 64 20 74 68 69 73 20 | cancell|ed this |
|00004750| 73 69 67 6e 65 72 20 72 | 65 71 75 65 73 74 2e 20 |signer r|equest. |
|00004760| 59 6f 75 20 6d 61 79 20 | 63 68 6f 6f 73 65 20 74 |You may |choose t|
|00004770| 6f 20 69 67 6e 6f 72 65 | 20 74 68 69 73 20 65 72 |o ignore| this er|
|00004780| 72 6f 72 2e 09 0d 6b 53 | 49 47 50 61 73 73 77 6f |ror...kS|IGPasswo|
|00004790| 72 64 45 72 72 09 54 68 | 65 20 75 73 65 72 20 65 |rdErr.Th|e user e|
|000047a0| 6e 74 65 72 65 64 20 61 | 6e 20 69 6e 63 6f 72 72 |ntered a|n incorr|
|000047b0| 65 63 74 20 70 61 73 73 | 77 6f 72 64 2e 09 0d 6b |ect pass|word...k|
|000047c0| 53 49 47 53 69 67 6e 65 | 72 4e 6f 74 56 61 6c 69 |SIGSigne|rNotVali|
|000047d0| 64 09 54 68 65 20 73 69 | 67 6e 65 72 20 66 69 6c |d.The si|gner fil|
|000047e0| 65 20 69 73 20 69 6e 63 | 6f 72 72 65 63 74 2e 09 |e is inc|orrect..|
|000047f0| 0d 77 72 50 65 72 6d 45 | 72 72 09 54 68 65 20 64 |.wrPermE|rr.The d|
|00004800| 61 74 61 20 66 69 6c 65 | 20 69 73 20 6d 61 72 6b |ata file| is mark|
|00004810| 65 64 20 72 65 61 64 2d | 6f 6e 6c 79 20 28 70 65 |ed read-|only (pe|
|00004820| 72 68 61 70 73 20 69 74 | 20 77 61 73 20 61 6c 72 |rhaps it| was alr|
|00004830| 65 61 64 79 20 73 69 67 | 6e 65 64 3f 29 09 0d 76 |eady sig|ned?)..v|
|00004840| 6f 69 64 09 09 09 09 56 | 65 72 69 66 79 46 69 6c |oid....V|erifyFil|
|00004850| 65 28 0d 09 63 6f 6e 73 | 74 20 46 53 53 70 65 63 |e(..cons|t FSSpec|
|00004860| 09 09 2a 64 61 74 61 46 | 69 6c 65 2c 0d 09 53 49 |..*dataF|ile,..SI|
|00004870| 47 53 74 61 74 75 73 50 | 72 6f 63 50 74 72 09 73 |GStatusP|rocPtr.s|
|00004880| 74 61 74 75 73 50 72 6f | 63 0d 29 3b 0d 56 65 72 |tatusPro|c.);.Ver|
|00004890| 69 66 79 20 74 68 65 20 | 73 69 67 6e 61 74 75 72 |ify the |signatur|
|000048a0| 65 20 69 6e 20 74 68 65 | 20 66 69 6c 65 20 73 70 |e in the| file sp|
|000048b0| 65 63 69 66 69 65 64 20 | 62 79 20 64 61 74 61 46 |ecified |by dataF|
|000048c0| 69 6c 65 2e 20 20 53 74 | 61 74 75 73 50 72 6f 63 |ile. St|atusProc|
|000048d0| 20 64 65 66 69 6e 65 73 | 20 74 68 65 20 75 73 65 | defines| the use|
|000048e0| 72 20 73 74 61 74 75 73 | 20 70 72 6f 63 65 64 75 |r status| procedu|
|000048f0| 72 65 2e 20 55 73 65 20 | 67 53 49 47 53 74 61 74 |re. Use |gSIGStat|
|00004900| 75 73 50 72 6f 63 20 66 | 6f 72 20 74 68 65 20 64 |usProc f|or the d|
|00004910| 65 66 61 75 6c 74 20 77 | 69 6e 64 6f 77 2e 20 59 |efault w|indow. Y|
|00004920| 6f 75 20 73 68 6f 75 6c | 64 20 63 61 6c 6c 20 56 |ou shoul|d call V|
|00004930| 65 72 69 66 79 46 69 6c | 65 20 69 6e 20 61 20 54 |erifyFil|e in a T|
|00004940| 52 59 2f 43 41 54 43 48 | 20 63 6f 6e 74 65 78 74 |RY/CATCH| context|
|00004950| 2c 20 63 68 65 63 6b 69 | 6e 67 20 66 6f 72 20 74 |, checki|ng for t|
|00004960| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 65 72 72 |he follo|wing err|
|00004970| 6f 72 73 3a 0d 6b 53 49 | 47 55 73 65 72 43 61 6e |ors:.kSI|GUserCan|
|00004980| 63 65 6c 65 64 09 54 68 | 65 20 75 73 65 72 20 63 |celed.Th|e user c|
|00004990| 61 6e 63 65 6c 6c 65 64 | 20 74 68 69 73 20 76 65 |ancelled| this ve|
|000049a0| 72 69 66 69 63 61 74 69 | 6f 6e 20 72 65 71 75 65 |rificati|on reque|
|000049b0| 73 74 2e 20 59 6f 75 20 | 6d 61 79 20 63 68 6f 6f |st. You |may choo|
|000049c0| 73 65 20 74 6f 20 69 67 | 6e 6f 72 65 20 74 68 69 |se to ig|nore thi|
|000049d0| 73 20 65 72 72 6f 72 2e | 09 0d 6b 53 49 47 56 65 |s error.|..kSIGVe|
|000049e0| 72 69 66 79 46 61 69 6c | 65 64 45 72 72 09 56 65 |rifyFail|edErr.Ve|
|000049f0| 72 69 66 69 63 61 74 69 | 6f 6e 20 66 61 69 6c 65 |rificati|on faile|
|00004a00| 64 3a 20 74 68 65 20 66 | 69 6c 65 20 6f 72 20 73 |d: the f|ile or s|
|00004a10| 69 67 6e 61 74 75 72 65 | 20 6d 61 79 20 68 61 76 |ignature| may hav|
|00004a20| 65 20 62 65 65 6e 20 63 | 68 61 6e 67 65 64 2e 09 |e been c|hanged..|
|00004a30| 0d 6b 53 49 47 49 6e 76 | 61 6c 69 64 43 72 65 64 |.kSIGInv|alidCred|
|00004a40| 65 6e 74 69 61 6c 45 72 | 72 09 56 65 72 69 66 69 |entialEr|r.Verifi|
|00004a50| 63 61 74 69 6f 6e 20 73 | 75 63 63 65 65 64 65 64 |cation s|ucceeded|
|00004a60| 2c 20 62 75 74 20 74 68 | 65 20 63 72 65 64 65 6e |, but th|e creden|
|00004a70| 74 69 61 6c 73 20 61 72 | 65 20 70 65 6e 64 69 6e |tials ar|e pendin|
|00004a80| 67 20 6f 72 20 68 61 76 | 65 20 65 78 70 69 72 65 |g or hav|e expire|
|00004a90| 64 2e 20 54 68 65 20 63 | 6f 6e 74 65 78 74 20 69 |d. The c|ontext i|
|00004aa0| 73 20 73 74 69 6c 6c 20 | 61 63 74 69 76 65 2e 09 |s still |active..|
|00004ab0| 0d 42 6f 6f 6c 65 61 6e | 09 09 09 46 69 6c 65 49 |.Boolean|...FileI|
|00004ac0| 73 53 69 67 6e 65 64 28 | 0d 09 63 6f 6e 73 74 20 |sSigned(|..const |
|00004ad0| 46 53 53 70 65 63 09 09 | 2a 64 61 74 61 46 69 6c |FSSpec..|*dataFil|
|00004ae0| 65 2c 0d 29 3b 0d 52 65 | 74 75 72 6e 20 54 52 55 |e,.);.Re|turn TRU|
|00004af0| 45 20 69 66 20 74 68 65 | 20 73 70 65 63 69 66 69 |E if the| specifi|
|00004b00| 65 64 20 66 69 6c 65 20 | 68 61 73 20 61 20 73 69 |ed file |has a si|
|00004b10| 67 6e 61 74 75 72 65 2e | 20 4e 6f 74 65 20 74 68 |gnature.| Note th|
|00004b20| 61 74 20 74 68 65 20 73 | 69 67 6e 61 74 75 72 65 |at the s|ignature|
|00004b30| 20 69 73 20 6e 6f 74 20 | 76 65 72 69 66 69 65 64 | is not |verified|
|00004b40| 2e 0d 0e be 00 00 00 00 | 02 d7 02 23 00 11 02 ff |........|...#....|
|00004b50| 0c 00 ff ff ff ff 00 00 | 00 00 00 00 00 00 02 23 |........|.......#|
|00004b60| 00 00 02 d7 00 00 00 00 | 00 00 00 1e 00 0c 00 1e |........|........|
|00004b70| 00 1f 00 01 00 0a 00 00 | 00 00 03 18 02 64 00 2c |........|.....d.,|
|00004b80| 00 0b 00 10 08 50 61 6c | 61 74 69 6e 6f 00 00 03 |.....Pal|atino...|
|00004b90| 00 10 00 0d 00 0c 00 2e | 00 04 00 00 00 00 00 2b |........|.......+|
|00004ba0| 5a 2e 16 44 69 67 69 74 | 61 6c 20 53 69 67 6e 61 |Z..Digit|al Signa|
|00004bb0| 74 75 72 65 20 44 65 6d | 6f 00 00 28 00 2e 02 01 |ture Dem|o..(....|
|00004bc0| 01 31 00 29 06 01 2e 00 | 00 04 01 00 00 0d 00 18 |.1.)....|........|
|00004bd0| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 00 00 00 35 |...d..ON|LN.d...5|
|00004be0| 00 5c 00 4e 01 cb 00 28 | 00 66 00 7a 16 44 49 47 |.\.N...(|.f.z.DIG|
|00004bf0| 49 54 41 4c 20 53 49 47 | 4e 41 54 55 52 45 20 44 |ITAL SIG|NATURE D|
|00004c00| 45 4d 4f 00 00 2c 00 0c | 00 15 09 48 65 6c 76 65 |EMO..,..|...Helve|
|00004c10| 74 69 63 61 00 03 00 15 | 00 0d 00 0e 00 a1 00 64 |tica....|.......d|
|00004c20| 00 10 4f 4e 4c 4e 00 64 | 00 17 00 4e 00 d8 00 5d |..ONLN.d|...N...]|
|00004c30| 01 4f 00 2b 7c 12 0c 4d | 41 52 54 49 4e 20 4d 49 |.O.+|..M|ARTIN MI|
|00004c40| 4e 4f 57 00 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |NOW....d|..ONLN.d|
|00004c50| 00 24 00 5c 00 90 00 6b | 01 97 00 28 00 86 00 ae |.$.\...k|...(....|
|00004c60| 1b 44 45 56 45 4c 4f 50 | 45 52 20 54 45 43 48 4e |.DEVELOP|ER TECHN|
|00004c70| 49 43 41 4c 20 53 55 50 | 50 4f 52 54 00 a1 00 64 |ICAL SUP|PORT...d|
|00004c80| 00 10 4f 4e 4c 4e 00 64 | 00 40 00 83 00 3c 00 92 |..ONLN.d|.@...<..|
|00004c90| 00 93 00 28 00 ad 00 5a | 0c 49 6e 74 72 6f 64 75 |...(...Z|.Introdu|
|00004ca0| 63 74 69 6f 6e 00 00 03 | 00 10 00 04 00 00 00 0d |ction...|........|
|00004cb0| 00 0c 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 00 4d |.....d..|ONLN.d.M|
|00004cc0| 00 9d 00 3c 00 ab 01 b4 | 00 2a 19 41 54 68 65 20 |...<....|.*.AThe |
|00004cd0| 44 69 67 69 74 61 6c 20 | 53 69 67 6e 61 74 75 72 |Digital |Signatur|
|00004ce0| 65 20 44 65 6d 6f 20 69 | 6c 6c 75 73 74 72 61 74 |e Demo i|llustrat|
|00004cf0| 65 73 20 68 6f 77 20 41 | 4f 43 45 20 44 69 67 69 |es how A|OCE Digi|
|00004d00| 74 61 6c 20 53 69 67 6e | 61 74 75 72 65 00 00 a1 |tal Sign|ature...|
|00004d10| 00 64 00 10 4f 4e 4c 4e | 00 64 00 8f 00 ab 00 3c |.d..ONLN|.d.....<|
|00004d20| 00 b9 01 ec 00 2a 0e 4a | 74 65 63 68 6e 6f 6c 6f |.....*.J|technolo|
|00004d30| 67 79 20 6d 61 79 20 62 | 65 20 69 6e 63 6f 72 70 |gy may b|e incorp|
|00004d40| 6f 72 61 74 65 64 20 69 | 6e 74 6f 20 61 6e 20 65 |orated i|nto an e|
|00004d50| 78 69 73 74 69 6e 67 20 | 61 70 70 6c 69 63 61 74 |xisting |applicat|
|00004d60| 69 6f 6e 20 77 69 74 68 | 20 61 20 6d 69 6e 69 6d |ion with| a minim|
|00004d70| 75 6d 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 00 da |um...d..|ONLN.d..|
|00004d80| 00 b9 00 3c 00 c7 01 d0 | 00 2a 0e 4c 6f 66 20 66 |...<....|.*.Lof f|
|00004d90| 75 73 73 2c 20 61 6e 64 | 20 77 69 74 68 6f 75 74 |uss, and| without|
|00004da0| 20 73 69 67 6e 69 66 69 | 63 61 6e 74 6c 79 20 70 | signifi|cantly p|
|00004db0| 65 72 74 75 72 62 61 74 | 69 6f 6e 20 6f 66 20 74 |erturbat|ion of t|
|00004dc0| 68 65 20 65 78 69 73 74 | 69 6e 67 20 61 70 70 6c |he exist|ing appl|
|00004dd0| 69 63 61 74 69 6f 6e 2e | 00 a1 00 64 00 10 4f 4e |ication.|...d..ON|
|00004de0| 4c 4e 00 64 01 27 00 cd | 00 3c 00 db 01 c9 00 2a |LN.d.'..|.<.....*|
|00004df0| 14 44 54 68 65 20 64 65 | 6d 6f 20 65 78 74 65 6e |.DThe de|mo exten|
|00004e00| 64 73 20 74 68 65 20 54 | 68 69 6e 6b 20 43 6c 61 |ds the T|hink Cla|
|00004e10| 73 73 20 4c 69 62 72 61 | 72 79 20 d2 54 69 6e 79 |ss Libra|ry .Tiny|
|00004e20| 20 45 64 69 74 d3 20 73 | 61 6d 70 6c 65 20 70 72 | Edit. s|ample pr|
|00004e30| 6f 67 72 61 6d 2c 00 a1 | 00 64 00 10 4f 4e 4c 4e |ogram,..|.d..ONLN|
|00004e40| 00 64 01 6c 00 db 00 3c | 00 e9 01 e1 00 2a 0e 4b |.d.l...<|.....*.K|
|00004e50| 61 6c 6c 6f 77 69 6e 67 | 20 64 6f 63 75 6d 65 6e |allowing| documen|
|00004e60| 74 73 20 63 72 65 61 74 | 65 64 20 62 79 20 54 69 |ts creat|ed by Ti|
|00004e70| 6e 79 45 64 69 74 20 74 | 6f 20 62 65 20 d2 73 69 |nyEdit t|o be .si|
|00004e80| 67 6e 65 64 d3 20 61 6e | 64 20 d2 76 65 72 69 66 |gned. an|d .verif|
|00004e90| 69 65 64 d3 20 62 79 20 | 74 68 65 00 00 a1 00 64 |ied. by |the....d|
|00004ea0| 00 10 4f 4e 4c 4e 00 64 | 01 b8 00 e9 00 3c 00 f7 |..ONLN.d|.....<..|
|00004eb0| 01 c7 00 2a 0e 46 44 69 | 67 69 74 61 6c 20 53 69 |...*.FDi|gital Si|
|00004ec0| 67 6e 61 74 75 72 65 20 | 4d 61 6e 61 67 65 72 2e |gnature |Manager.|
|00004ed0| 20 49 74 20 61 6c 73 6f | 20 73 68 6f 77 73 20 68 | It also| shows h|
|00004ee0| 6f 77 20 44 69 67 69 74 | 61 6c 20 53 69 67 6e 61 |ow Digit|al Signa|
|00004ef0| 74 75 72 65 73 20 6d 61 | 79 20 62 65 00 a1 00 64 |tures ma|y be...d|
|00004f00| 00 10 4f 4e 4c 4e 00 64 | 01 ff 00 f7 00 3c 01 05 |..ONLN.d|.....<..|
|00004f10| 01 e3 00 2a 0e 4f 61 70 | 70 6c 69 65 64 20 74 6f |...*.Oap|plied to|
|00004f20| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 64 61 74 | applica|tion dat|
|00004f30| 61 2c 20 73 75 63 68 20 | 61 73 20 74 68 65 20 73 |a, such |as the s|
|00004f40| 74 61 74 65 20 6f 66 20 | 63 68 65 63 6b 62 6f 78 |tate of |checkbox|
|00004f50| 65 73 20 61 6e 64 20 72 | 61 64 69 6f 20 62 75 74 |es and r|adio but|
|00004f60| 74 6f 6e 73 2e 00 00 a1 | 00 64 00 10 4f 4e 4c 4e |tons....|.d..ONLN|
|00004f70| 00 64 02 4f 01 0b 00 3c | 01 19 01 e9 00 2a 14 4e |.d.O...<|.....*.N|
|00004f80| 41 6c 74 68 6f 75 67 68 | 20 74 68 65 20 63 6c 61 |Although| the cla|
|00004f90| 73 73 20 69 73 20 64 65 | 66 69 6e 65 64 20 66 6f |ss is de|fined fo|
|00004fa0| 72 2c 20 61 6e 64 20 6f | 70 65 72 61 74 65 73 20 |r, and o|perates |
|00004fb0| 77 69 74 68 69 6e 20 74 | 68 65 20 54 68 69 6e 6b |within t|he Think|
|00004fc0| 20 43 6c 61 73 73 20 4c | 69 62 72 61 72 79 00 a1 | Class L|ibrary..|
|00004fd0| 00 64 00 10 4f 4e 4c 4e | 00 64 02 9e 01 19 00 3c |.d..ONLN|.d.....<|
|00004fe0| 01 27 01 e0 00 2a 0e 51 | 6f 72 67 61 6e 69 7a 61 |.'...*.Q|organiza|
|00004ff0| 74 69 6f 6e 61 6c 20 73 | 74 72 75 63 74 75 72 65 |tional s|tructure|
|00005000| 2c 20 69 74 20 73 68 6f | 75 6c 64 20 62 65 20 72 |, it sho|uld be r|
|00005010| 65 6c 61 74 69 76 65 6c | 79 20 65 61 73 79 20 74 |elativel|y easy t|
|00005020| 6f 20 61 64 61 70 74 20 | 69 74 20 74 6f 20 6f 74 |o adapt |it to ot|
|00005030| 68 65 72 20 63 6c 61 73 | 73 00 00 a1 00 64 00 10 |her clas|s....d..|
|00005040| 4f 4e 4c 4e 00 64 02 f0 | 01 27 00 3c 01 35 01 b8 |ONLN.d..|.'.<.5..|
|00005050| 00 2a 0e 46 68 69 65 72 | 61 72 63 68 69 65 73 2e |.*.Fhier|archies.|
|00005060| 20 45 76 65 6e 20 69 66 | 20 79 6f 75 20 64 6f 20 | Even if| you do |
|00005070| 6e 6f 74 20 75 73 65 20 | 61 20 63 6c 61 73 73 20 |not use |a class |
|00005080| 6c 69 62 72 61 72 79 20 | 64 65 73 69 67 6e 20 69 |library |design i|
|00005090| 6e 20 79 6f 75 72 20 6f | 77 6e 00 a1 00 64 00 10 |n your o|wn...d..|
|000050a0| 4f 4e 4c 4e 00 64 03 37 | 01 35 00 3c 01 43 01 e0 |ONLN.d.7|.5.<.C..|
|000050b0| 00 2a 0e 4e 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |.*.Nappl|ications|
|000050c0| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 73 74 69 |, you sh|ould sti|
|000050d0| 6c 6c 20 62 65 20 61 62 | 6c 65 20 74 6f 20 75 73 |ll be ab|le to us|
|000050e0| 65 20 74 68 65 20 64 65 | 6d 6f 20 61 73 20 61 20 |e the de|mo as a |
|000050f0| 62 61 73 69 73 20 66 6f | 72 20 79 6f 75 72 20 6f |basis fo|r your o|
|00005100| 77 6e 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 03 86 |wn...d..|ONLN.d..|
|00005110| 01 43 00 3c 01 51 01 04 | 00 2a 0e 25 44 69 67 69 |.C.<.Q..|.*.%Digi|
|00005120| 74 61 6c 20 53 69 67 6e | 61 74 75 72 65 20 73 75 |tal Sign|ature su|
|00005130| 62 72 6f 75 74 69 6e 65 | 20 6c 69 62 72 61 72 79 |broutine| library|
|00005140| 2e 00 00 03 00 15 00 04 | 01 00 00 0d 00 0e 00 a1 |........|........|
|00005150| 00 64 00 10 4f 4e 4c 4e | 00 64 03 ac 01 5d 00 3c |.d..ONLN|.d...].<|
|00005160| 01 6c 00 ae 00 2a 1b 0f | 43 6c 61 73 73 20 48 69 |.l...*..|Class Hi|
|00005170| 65 72 61 72 63 68 79 00 | 00 03 00 10 00 04 00 00 |erarchy.|........|
|00005180| 00 0d 00 0c 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |.......d|..ONLN.d|
|00005190| 03 bc 01 77 00 3c 01 85 | 01 c8 00 2a 19 47 54 68 |...w.<..|...*.GTh|
|000051a0| 65 20 64 65 6d 6f 20 64 | 65 66 69 6e 65 73 20 61 |e demo d|efines a|
|000051b0| 20 43 53 69 67 6e 61 74 | 75 72 65 20 63 6c 61 73 | CSignat|ure clas|
|000051c0| 73 20 61 6e 64 20 74 77 | 6f 20 73 75 62 63 6c 61 |s and tw|o subcla|
|000051d0| 73 73 65 73 20 74 68 61 | 74 20 61 72 65 20 75 73 |sses tha|t are us|
|000051e0| 65 64 20 74 6f 00 00 a1 | 00 64 00 10 4f 4e 4c 4e |ed to...|.d..ONLN|
|000051f0| 00 64 04 04 01 85 00 3c | 01 93 01 d7 00 2a 0e 4d |.d.....<|.....*.M|
|00005200| 6d 61 6e 69 70 75 6c 61 | 74 65 20 64 69 67 69 74 |manipula|te digit|
|00005210| 61 6c 20 73 69 67 6e 61 | 74 75 72 65 73 2e 20 49 |al signa|tures. I|
|00005220| 74 20 61 6c 73 6f 20 61 | 64 64 73 20 61 20 66 65 |t also a|dds a fe|
|00005230| 77 20 73 69 6d 70 6c 65 | 20 63 6c 61 73 73 65 73 |w simple| classes|
|00005240| 20 74 68 61 74 20 61 64 | 64 20 74 68 65 00 00 a1 | that ad|d the...|
|00005250| 00 64 00 10 4f 4e 4c 4e | 00 64 04 52 01 93 00 3c |.d..ONLN|.d.R...<|
|00005260| 01 a1 01 aa 00 2a 0e 46 | 6e 65 63 65 73 73 61 72 |.....*.F|necessar|
|00005270| 79 20 63 61 70 61 62 69 | 6c 69 74 69 65 73 20 74 |y capabi|lities t|
|00005280| 6f 20 54 69 6e 79 45 64 | 69 74 2e 20 54 68 65 20 |o TinyEd|it. The |
|00005290| 63 6c 61 73 73 20 68 69 | 65 72 61 72 63 68 79 20 |class hi|erarchy |
|000052a0| 69 73 20 61 73 20 66 6f | 6c 6c 6f 77 73 3a 00 04 |is as fo|llows:..|
|000052b0| 02 00 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 04 99 |.....d..|ONLN.d..|
|000052c0| 01 a2 00 3c 01 b0 00 58 | 00 2a 0f 05 43 6c 61 73 |...<...X|.*..Clas|
|000052d0| 73 00 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 04 a0 |s....d..|ONLN.d..|
|000052e0| 01 a2 00 e4 01 b0 01 24 | 00 29 a8 0b 44 65 73 63 |.......$|.)..Desc|
|000052f0| 72 69 70 74 69 6f 6e 00 | 00 22 01 c0 00 55 00 00 |ription.|."...U..|
|00005300| 00 23 00 00 00 22 01 c0 | 00 56 76 00 00 22 01 c0 |.#..."..|.Vv.."..|
|00005310| 00 cd 00 00 00 22 01 c0 | 00 ce 2e 00 00 22 01 c0 |....."..|....."..|
|00005320| 00 fd 00 00 00 20 01 c0 | 00 fe 01 c0 02 28 00 22 |..... ..|.....(."|
|00005330| 01 c0 02 29 00 00 00 23 | 00 00 00 22 01 c1 00 55 |...)...#|..."...U|
|00005340| 00 0d 00 22 01 c1 00 fd | 00 0d 00 22 01 c1 02 29 |..."....|..."...)|
|00005350| 00 0d 00 2c 00 0a 00 16 | 07 43 6f 75 72 69 65 72 |...,....|.Courier|
|00005360| 00 03 00 16 00 04 00 00 | 00 a1 00 64 00 10 4f 4e |........|...d..ON|
|00005370| 4c 4e 00 64 04 ad 01 b9 | 00 3c 01 c5 00 82 00 28 |LN.d....|.<.....(|
|00005380| 01 e2 00 5a 0a 43 53 69 | 67 6e 61 74 75 72 65 00 |...Z.CSi|gnature.|
|00005390| 00 03 00 10 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |.......d|..ONLN.d|
|000053a0| 04 b9 01 b7 00 e4 01 c5 | 02 02 00 28 01 e0 01 02 |........|...(....|
|000053b0| 36 54 68 65 20 62 61 73 | 65 20 63 6c 61 73 73 20 |6The bas|e class |
|000053c0| 66 6f 72 20 44 69 67 69 | 74 61 6c 20 53 69 67 6e |for Digi|tal Sign|
|000053d0| 61 74 75 72 65 73 2e 20 | 43 53 69 67 6e 61 74 75 |atures. |CSignatu|
|000053e0| 72 65 20 69 73 20 61 00 | 00 a1 00 64 00 10 4f 4e |re is a.|...d..ON|
|000053f0| 4c 4e 00 64 04 f0 01 c5 | 00 e4 01 d3 01 e7 00 2a |LN.d....|.......*|
|00005400| 0e 31 73 75 62 63 6c 61 | 73 73 20 74 6f 20 74 68 |.1subcla|ss to th|
|00005410| 65 20 62 61 73 65 2d 63 | 6c 61 73 73 2c 20 43 4f |e base-c|lass, CO|
|00005420| 62 6a 65 63 74 2e 20 41 | 70 70 6c 69 63 61 74 69 |bject. A|pplicati|
|00005430| 6f 6e 73 00 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |ons....d|..ONLN.d|
|00005440| 05 22 01 d3 00 e4 01 e1 | 01 f2 00 2a 0e 33 6e 6f |."......|...*.3no|
|00005450| 72 6d 61 6c 6c 79 20 64 | 6f 20 6e 6f 74 20 63 72 |rmally d|o not cr|
|00005460| 65 61 74 65 20 69 6e 73 | 74 61 6e 63 65 73 20 6f |eate ins|tances o|
|00005470| 66 20 74 68 69 73 20 63 | 6c 61 73 73 2c 20 62 75 |f this c|lass, bu|
|00005480| 74 00 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 05 56 |t....d..|ONLN.d.V|
|00005490| 01 e1 00 e4 01 ef 01 59 | 00 2a 0e 16 72 61 74 68 |.......Y|.*..rath|
|000054a0| 65 72 20 75 73 65 20 73 | 75 62 63 6c 61 73 73 65 |er use s|ubclasse|
|000054b0| 73 2e 00 22 01 cf 00 55 | 00 00 00 22 01 cf 00 56 |s.."...U|..."...V|
|000054c0| 76 00 00 22 01 cf 00 cd | 00 00 00 22 01 cf 00 ce |v.."....|..."....|
|000054d0| 2e 00 00 22 01 cf 00 fd | 00 00 00 20 01 cf 00 fe |..."....|... ....|
|000054e0| 01 cf 02 28 00 22 01 cf | 02 29 00 00 00 22 01 d0 |...(."..|.)..."..|
|000054f0| 00 55 00 3d 00 22 01 d0 | 00 fd 00 3d 00 22 01 d0 |.U.=."..|...=."..|
|00005500| 02 29 00 3d 00 03 00 16 | 00 a1 00 64 00 10 4f 4e |.).=....|...d..ON|
|00005510| 4c 4e 00 64 05 6f 01 f8 | 00 54 02 04 00 bd 00 28 |LN.d.o..|.T.....(|
|00005520| 02 21 00 72 0f 43 53 69 | 67 6e 65 64 44 61 74 61 |.!.r.CSi|gnedData|
|00005530| 46 69 6c 65 00 03 00 10 | 00 a1 00 64 00 10 4f 4e |File....|...d..ON|
|00005540| 4c 4e 00 64 05 7f 01 f6 | 00 e4 02 04 01 fe 00 28 |LN.d....|.......(|
|00005550| 02 1f 01 02 36 54 68 69 | 73 20 63 6c 61 73 73 20 |....6Thi|s class |
|00005560| 61 6c 6c 6f 77 73 20 73 | 69 67 6e 69 6e 67 20 6f |allows s|igning o|
|00005570| 72 20 76 65 72 69 66 79 | 69 6e 67 20 61 6e 20 65 |r verify|ing an e|
|00005580| 6e 74 69 72 65 20 66 69 | 6c 65 2e 00 00 a1 00 64 |ntire fi|le.....d|
|00005590| 00 10 4f 4e 4c 4e 00 64 | 05 b6 02 04 00 e4 02 12 |..ONLN.d|........|
|000055a0| 01 ff 00 2a 0e 35 49 74 | 20 69 73 20 75 73 65 64 |...*.5It| is used|
|000055b0| 20 74 6f 20 73 69 67 6e | 20 61 20 64 6f 63 75 6d | to sign| a docum|
|000055c0| 65 6e 74 20 61 66 74 65 | 72 20 69 74 20 68 61 73 |ent afte|r it has|
|000055d0| 20 62 65 65 6e 20 73 61 | 76 65 64 00 00 a1 00 64 | been sa|ved....d|
|000055e0| 00 10 4f 4e 4c 4e 00 64 | 05 ec 02 12 00 e4 02 20 |..ONLN.d|....... |
|000055f0| 01 fb 00 2a 0e 33 74 6f | 20 64 69 73 6b 2c 20 61 |...*.3to| disk, a|
|00005600| 6e 64 20 74 6f 20 76 65 | 72 69 66 79 20 61 6e 20 |nd to ve|rify an |
|00005610| 65 78 69 73 74 69 6e 67 | 20 73 69 67 6e 65 64 20 |existing| signed |
|00005620| 64 6f 63 75 6d 65 6e 74 | 2e 00 00 22 02 0e 00 55 |document|..."...U|
|00005630| 00 00 00 22 02 0e 00 56 | 16 00 00 22 02 0e 00 6d |..."...V|..."...m|
|00005640| 00 00 00 22 02 0e 00 6e | 5e 00 00 22 02 0e 00 cd |..."...n|^.."....|
|00005650| 00 00 00 22 02 0e 00 ce | 2e 00 00 22 02 0e 00 fd |..."....|..."....|
|00005660| 00 00 00 20 02 0e 00 fe | 02 0e 02 28 00 22 02 0e |... ....|...(."..|
|00005670| 02 29 00 00 00 22 02 0f | 00 55 00 2f 00 22 02 0f |.)..."..|.U./."..|
|00005680| 00 fd 00 2f 00 22 02 0f | 02 29 00 2f 00 03 00 16 |.../."..|.)./....|
|00005690| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 06 22 02 29 |...d..ON|LN.d.".)|
|000056a0| 00 54 02 35 00 af 00 28 | 02 52 00 72 0d 43 53 69 |.T.5...(|.R.r.CSi|
|000056b0| 67 6e 65 64 4f 62 6a 65 | 63 74 00 03 00 10 00 a1 |gnedObje|ct......|
|000056c0| 00 64 00 10 4f 4e 4c 4e | 00 64 06 30 02 27 00 e4 |.d..ONLN|.d.0.'..|
|000056d0| 02 35 01 fa 00 28 02 50 | 01 02 35 54 68 69 73 20 |.5...(.P|..5This |
|000056e0| 63 6c 61 73 73 20 61 6c | 6c 6f 77 73 20 73 69 67 |class al|lows sig|
|000056f0| 6e 69 6e 67 20 6f 72 20 | 76 65 72 69 66 79 69 6e |ning or |verifyin|
|00005700| 67 20 61 20 64 61 74 61 | 20 6f 62 6a 65 63 74 2e |g a data| object.|
|00005710| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 06 66 02 35 |...d..ON|LN.d.f.5|
|00005720| 00 e4 02 43 01 f8 00 2a | 0e 32 59 6f 75 72 20 61 |...C...*|.2Your a|
|00005730| 70 70 6c 69 63 61 74 69 | 6f 6e 20 73 68 6f 75 6c |pplicati|on shoul|
|00005740| 64 20 63 72 65 61 74 65 | 20 61 20 73 75 62 63 6c |d create| a subcl|
|00005750| 61 73 73 20 77 69 74 68 | 20 74 68 65 00 a1 00 64 |ass with| the...d|
|00005760| 00 10 4f 4e 4c 4e 00 64 | 06 99 02 43 00 e4 02 51 |..ONLN.d|...C...Q|
|00005770| 01 f7 00 2a 0e 2f 6e 65 | 63 65 73 73 61 72 79 20 |...*./ne|cessary |
|00005780| 63 6f 6e 74 65 6e 74 20 | 61 6e 64 20 6d 65 74 68 |content |and meth|
|00005790| 6f 64 73 2e 20 59 6f 75 | 20 63 61 6e 20 74 68 65 |ods. You| can the|
|000057a0| 6e 20 75 73 65 00 00 a1 | 00 64 00 10 4f 4e 4c 4e |n use...|.d..ONLN|
|000057b0| 00 64 06 c9 02 51 00 e4 | 02 5f 02 03 00 2a 0e 34 |.d...Q..|._...*.4|
|000057c0| 43 53 69 67 6e 65 64 4f | 62 6a 65 63 74 20 6d 65 |CSignedO|bject me|
|000057d0| 74 68 6f 64 73 20 74 6f | 20 73 69 67 6e 20 6f 72 |thods to| sign or|
|000057e0| 20 76 65 72 69 66 79 20 | 74 68 65 20 6f 62 6a 65 | verify |the obje|
|000057f0| 63 74 d5 73 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |ct.s...d|..ONLN.d|
|00005800| 06 fe 02 5f 00 e4 02 6d | 01 22 00 2a 0e 0c 61 63 |..._...m|.".*..ac|
|00005810| 74 75 61 6c 20 64 61 74 | 61 2e 00 22 02 3f 00 55 |tual dat|a..".?.U|
|00005820| 00 00 00 22 02 3f 00 56 | 16 00 00 22 02 3f 00 6d |...".?.V|...".?.m|
|00005830| 00 00 00 20 02 3f 00 6e | 02 3f 00 fc 00 22 02 3f |... .?.n|.?...".?|
|00005840| 00 fd 00 00 00 20 02 3f | 00 fe 02 3f 02 28 00 22 |..... .?|...?.(."|
|00005850| 02 3f 02 29 00 00 00 22 | 02 40 00 55 00 4b 00 22 |.?.)..."|.@.U.K."|
|00005860| 02 8c 00 55 17 00 00 22 | 02 8c 00 6d 00 00 00 20 |...U..."|...m... |
|00005870| 02 8c 00 6e 02 8c 00 fc | 00 22 02 40 00 fd 00 4b |...n....|.".@...K|
|00005880| 00 22 02 8c 00 fd 00 00 | 00 20 02 8c 00 fe 02 8c |."......|. ......|
|00005890| 02 28 00 22 02 40 02 29 | 00 4b 00 22 02 8c 02 29 |.(.".@.)|.K."...)|
|000058a0| 00 00 00 03 00 15 00 04 | 01 00 00 0d 00 0e 00 a1 |........|........|
|000058b0| 00 64 00 10 4f 4e 4c 4e | 00 64 07 0c 02 7a 00 3c |.d..ONLN|.d...z.<|
|000058c0| 02 89 00 b4 00 28 02 a4 | 00 5a 0e 53 61 6d 70 6c |.....(..|.Z.Sampl|
|000058d0| 65 20 50 72 6f 67 72 61 | 6d 00 00 03 00 10 00 04 |e Progra|m.......|
|000058e0| 00 00 00 0d 00 0c 00 a1 | 00 64 00 10 4f 4e 4c 4e |........|.d..ONLN|
|000058f0| 00 64 07 1b 02 94 00 3c | 02 a2 01 d7 00 2a 19 48 |.d.....<|.....*.H|
|00005900| 54 68 65 20 73 61 6d 70 | 6c 65 20 70 72 6f 67 72 |The samp|le progr|
|00005910| 61 6d 20 69 73 20 61 6e | 20 65 78 74 65 6e 73 69 |am is an| extensi|
|00005920| 6f 6e 20 6f 66 20 74 68 | 65 20 54 68 69 6e 6b 20 |on of th|e Think |
|00005930| 43 6c 61 73 73 20 4c 69 | 62 72 61 72 79 20 d2 54 |Class Li|brary .T|
|00005940| 69 6e 79 45 64 69 74 d3 | 00 a1 00 64 00 10 4f 4e |inyEdit.|...d..ON|
|00005950| 4c 4e 00 64 07 64 02 a2 | 00 3c 02 b0 01 d6 00 2a |LN.d.d..|.<.....*|
|00005960| 0e 4b 73 61 6d 70 6c 65 | 20 61 70 70 6c 69 63 61 |.Ksample| applica|
|00005970| 74 69 6f 6e 2e 20 49 74 | 20 65 78 74 65 6e 64 73 |tion. It| extends|
|00005980| 20 74 68 65 20 43 45 64 | 69 74 44 6f 63 20 63 6c | the CEd|itDoc cl|
|00005990| 61 73 73 20 74 6f 20 70 | 72 6f 76 69 64 65 20 66 |ass to p|rovide f|
|000059a0| 6f 72 20 73 69 67 6e 65 | 64 20 61 6e 64 00 00 04 |or signe|d and...|
|000059b0| 02 00 00 0d 00 0a 00 2a | 26 3a 43 6f 70 79 72 69 |.......*|&:Copyri|
|000059c0| 67 68 74 20 a9 20 31 39 | 39 33 2c 20 41 70 70 6c |ght . 19|93, Appl|
|000059d0| 65 20 43 6f 6d 70 75 74 | 65 72 20 49 6e 63 2e 20 |e Comput|er Inc. |
|000059e0| 41 6c 6c 20 52 69 67 68 | 74 73 20 52 65 73 65 72 |All Righ|ts Reser|
|000059f0| 76 65 64 2e 00 28 02 f1 | 02 00 02 3f 3f 00 00 ff |ved..(..|...??...|
|00005a00| 0d c4 00 00 00 00 02 d7 | 02 23 00 11 02 ff 0c 00 |........|.#......|
|00005a10| ff ff ff ff 00 00 00 00 | 00 00 00 00 02 23 00 00 |........|.....#..|
|00005a20| 02 d7 00 00 00 00 00 00 | 00 1e 00 0c 00 1e 00 1f |........|........|
|00005a30| 00 01 00 0a 00 00 00 00 | 03 18 02 64 00 2c 00 0b |........|...d.,..|
|00005a40| 00 10 08 50 61 6c 61 74 | 69 6e 6f 00 00 03 00 10 |...Palat|ino.....|
|00005a50| 00 0d 00 0c 00 2e 00 04 | 00 00 00 00 00 2b 5a 2e |........|.....+Z.|
|00005a60| 16 44 69 67 69 74 61 6c | 20 53 69 67 6e 61 74 75 |.Digital| Signatu|
|00005a70| 72 65 20 44 65 6d 6f 00 | 00 28 00 2e 02 01 01 32 |re Demo.|.(.....2|
|00005a80| 00 29 06 01 2e 00 00 a1 | 00 64 00 10 4f 4e 4c 4e |.)......|.d..ONLN|
|00005a90| 00 64 00 00 00 29 00 3c | 00 37 01 ec 00 28 00 52 |.d...).<|.7...(.R|
|00005aa0| 00 5a 4f 76 65 72 69 66 | 69 65 64 20 74 65 78 74 |.ZOverif|ied text|
|00005ab0| 20 66 69 6c 65 73 20 61 | 6e 64 20 61 64 64 73 20 | files a|nd adds |
|00005ac0| 61 20 73 61 6d 70 6c 65 | 20 63 6c 61 73 73 20 74 |a sample| class t|
|00005ad0| 6f 20 73 68 6f 77 20 68 | 6f 77 20 79 6f 75 20 63 |o show h|ow you c|
|00005ae0| 61 6e 20 73 69 67 6e 20 | 61 6e 64 20 76 65 72 69 |an sign |and veri|
|00005af0| 66 79 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 00 50 |fy...d..|ONLN.d.P|
|00005b00| 00 37 00 3c 00 45 01 d2 | 00 2a 0e 4a 74 68 65 20 |.7.<.E..|.*.Jthe |
|00005b10| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 61 20 64 69 |contents| of a di|
|00005b20| 61 6c 6f 67 2e 20 54 68 | 65 20 64 65 6d 6f 20 72 |alog. Th|e demo r|
|00005b30| 65 71 75 69 72 65 73 20 | 74 68 65 20 66 6f 6c 6c |equires |the foll|
|00005b40| 6f 77 69 6e 67 20 73 6f | 75 72 63 65 20 66 69 6c |owing so|urce fil|
|00005b50| 65 73 20 61 6e 64 00 a1 | 00 64 00 10 4f 4e 4c 4e |es and..|.d..ONLN|
|00005b60| 00 64 00 9b 00 45 00 3c | 00 53 00 88 00 2a 0e 0e |.d...E.<|.S...*..|
|00005b70| 74 68 65 69 72 20 68 65 | 61 64 65 72 73 3a 00 04 |their he|aders:..|
|00005b80| 01 00 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 00 aa |.....d..|ONLN.d..|
|00005b90| 00 53 00 54 00 61 00 69 | 00 2b 18 0e 04 46 69 6c |.S.T.a.i|.+...Fil|
|00005ba0| 65 00 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 00 af |e....d..|ONLN.d..|
|00005bb0| 00 53 00 f0 00 61 01 30 | 00 29 9c 0b 44 65 73 63 |.S...a.0|.)..Desc|
|00005bc0| 72 69 70 74 69 6f 6e 00 | 00 04 00 00 00 a1 00 64 |ription.|.......d|
|00005bd0| 00 10 4f 4e 4c 4e 00 64 | 00 bb 00 61 00 54 00 6f |..ONLN.d|...a.T.o|
|00005be0| 00 d9 00 28 00 8a 00 72 | 16 44 69 67 69 74 61 6c |...(...r|.Digital|
|00005bf0| 53 69 67 6e 61 74 75 72 | 65 44 65 6d 6f 2e 63 00 |Signatur|eDemo.c.|
|00005c00| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 00 d2 00 61 |...d..ON|LN.d...a|
|00005c10| 00 f0 00 6f 01 bd 00 29 | 9c 26 54 68 69 73 20 69 |...o...)|.&This i|
|00005c20| 73 20 74 68 65 20 6d 61 | 69 6e 20 70 72 6f 67 72 |s the ma|in progr|
|00005c30| 61 6d 2e 20 49 74 20 63 | 72 65 61 74 65 73 20 61 |am. It c|reates a|
|00005c40| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 00 f9 00 6f |...d..ON|LN.d...o|
|00005c50| 00 f0 00 7d 01 49 00 2a | 0e 0e 44 65 6d 6f 41 70 |...}.I.*|..DemoAp|
|00005c60| 70 20 63 6c 61 73 73 2e | 00 a1 00 64 00 10 4f 4e |p class.|...d..ON|
|00005c70| 4c 4e 00 64 01 08 00 7d | 00 54 00 8b 00 96 00 28 |LN.d...}|.T.....(|
|00005c80| 00 a6 00 72 09 44 65 6d | 6f 41 70 70 2e 63 00 a1 |...r.Dem|oApp.c..|
|00005c90| 00 64 00 10 4f 4e 4c 4e | 00 64 01 12 00 7d 00 f0 |.d..ONLN|.d...}..|
|00005ca0| 00 8b 01 db 00 29 9c 2c | 54 68 69 73 20 69 73 20 |.....).,|This is |
|00005cb0| 61 20 73 75 62 63 6c 61 | 73 73 20 74 6f 20 43 45 |a subcla|ss to CE|
|00005cc0| 64 69 74 41 70 70 20 74 | 68 61 74 20 6c 65 74 73 |ditApp t|hat lets|
|00005cd0| 20 79 6f 75 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 | you...d|..ONLN.d|
|00005ce0| 01 3f 00 8b 00 f0 00 99 | 01 e8 00 2a 0e 2b 6f 70 |.?......|...*.+op|
|00005cf0| 65 6e 20 73 69 67 6e 65 | 64 20 64 6f 63 75 6d 65 |en signe|d docume|
|00005d00| 6e 74 73 20 61 6e 64 20 | 73 74 61 72 74 73 20 74 |nts and |starts t|
|00005d10| 68 65 20 73 69 67 6e 65 | 64 00 00 a1 00 64 00 10 |he signe|d....d..|
|00005d20| 4f 4e 4c 4e 00 64 01 6b | 00 99 00 f0 00 a7 01 e3 |ONLN.d.k|........|
|00005d30| 00 2a 0e 2b 6f 62 6a 65 | 63 74 20 64 65 6d 6f 2e |.*.+obje|ct demo.|
|00005d40| 20 49 74 20 61 6c 73 6f | 20 6f 76 65 72 72 69 64 | It also| overrid|
|00005d50| 65 73 20 61 20 d2 73 68 | 75 74 64 6f 77 6e d3 00 |es a .sh|utdown..|
|00005d60| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 01 97 00 a7 |...d..ON|LN.d....|
|00005d70| 00 f0 00 b5 01 e3 00 2a | 0e 2b 6d 65 74 68 6f 64 |.......*|.+method|
|00005d80| 20 74 6f 20 65 6e 73 75 | 72 65 20 74 68 61 74 20 | to ensu|re that |
|00005d90| 74 68 65 20 73 69 67 6e | 61 74 75 72 65 20 63 6f |the sign|ature co|
|00005da0| 6e 74 65 78 74 00 00 a1 | 00 64 00 10 4f 4e 4c 4e |ntext...|.d..ONLN|
|00005db0| 00 64 01 c3 00 b5 00 f0 | 00 c3 01 d7 00 2a 0e 26 |.d......|.....*.&|
|00005dc0| 68 61 73 20 62 65 65 6e | 20 72 65 6d 6f 76 65 64 |has been| removed|
|00005dd0| 20 77 68 65 6e 20 79 6f | 75 72 20 61 70 70 6c 69 | when yo|ur appli|
|00005de0| 63 61 74 69 6f 6e 00 a1 | 00 64 00 10 4f 4e 4c 4e |cation..|.d..ONLN|
|00005df0| 00 64 01 ea 00 c3 00 f0 | 00 d1 01 0c 00 2a 0e 06 |.d......|.....*..|
|00005e00| 65 78 69 74 73 2e 00 a1 | 00 64 00 10 4f 4e 4c 4e |exits...|.d..ONLN|
|00005e10| 00 64 01 f1 00 d1 00 54 | 00 df 00 a9 00 28 00 fa |.d.....T|.....(..|
|00005e20| 00 72 0d 44 65 6d 6f 45 | 64 69 74 44 6f 63 2e 63 |.r.DemoE|ditDoc.c|
|00005e30| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 01 ff 00 d1 |...d..ON|LN.d....|
|00005e40| 00 f0 00 df 01 d8 00 29 | 9c 2c 54 68 69 73 20 69 |.......)|.,This i|
|00005e50| 73 20 61 20 73 75 62 63 | 6c 61 73 73 20 74 6f 20 |s a subc|lass to |
|00005e60| 43 45 64 69 74 44 6f 63 | 20 74 68 61 74 20 6c 65 |CEditDoc| that le|
|00005e70| 74 73 20 79 6f 75 00 a1 | 00 64 00 10 4f 4e 4c 4e |ts you..|.d..ONLN|
|00005e80| 00 64 02 2c 00 df 00 f0 | 00 ed 01 c1 00 2a 0e 26 |.d.,....|.....*.&|
|00005e90| 73 69 67 6e 20 61 6e 64 | 20 76 65 72 69 66 79 20 |sign and| verify |
|00005ea0| 64 6f 63 75 6d 65 6e 74 | 73 2e 20 49 74 20 61 6c |document|s. It al|
|00005eb0| 73 6f 20 68 61 73 00 a1 | 00 64 00 10 4f 4e 4c 4e |so has..|.d..ONLN|
|00005ec0| 00 64 02 53 00 ed 00 f0 | 00 fb 01 cd 00 2a 0e 24 |.d.S....|.....*.$|
|00005ed0| 6d 65 74 68 6f 64 73 20 | 6f 76 65 72 72 69 64 65 |methods |override|
|00005ee0| 20 43 45 64 69 74 44 6f | 63 20 6d 65 74 68 6f 64 | CEditDo|c method|
|00005ef0| 73 20 69 6e 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |s in...d|..ONLN.d|
|00005f00| 02 78 00 fb 00 f0 01 09 | 01 c5 00 2a 0e 27 6f 72 |.x......|...*.'or|
|00005f10| 64 65 72 20 74 6f 20 70 | 72 6f 76 69 64 65 20 62 |der to p|rovide b|
|00005f20| 65 74 74 65 72 20 65 72 | 72 6f 72 20 6d 65 73 73 |etter er|ror mess|
|00005f30| 61 67 65 73 2e 00 00 a1 | 00 64 00 10 4f 4e 4c 4e |ages....|.d..ONLN|
|00005f40| 00 64 02 a0 01 09 00 54 | 01 17 00 c6 00 28 01 32 |.d.....T|.....(.2|
|00005f50| 00 72 12 44 65 6d 6f 53 | 69 67 6e 65 64 4f 62 6a |.r.DemoS|ignedObj|
|00005f60| 65 63 74 2e 63 00 00 a1 | 00 64 00 10 4f 4e 4c 4e |ect.c...|.d..ONLN|
|00005f70| 00 64 02 b3 01 09 00 f0 | 01 17 01 c2 00 29 9c 28 |.d......|.....).(|
|00005f80| 54 68 69 73 20 6f 62 6a | 65 63 74 20 63 61 6e 20 |This obj|ect can |
|00005f90| 73 69 67 6e 20 61 6e 64 | 20 76 65 72 69 66 79 20 |sign and| verify |
|00005fa0| 69 74 73 20 64 61 74 61 | 00 a1 00 64 00 10 4f 4e |its data|...d..ON|
|00005fb0| 4c 4e 00 64 02 dc 01 17 | 00 f0 01 25 01 d5 00 2a |LN.d....|...%...*|
|00005fc0| 0e 2c 63 6f 6e 74 65 6e | 74 73 2e 20 49 74 20 69 |.,conten|ts. It i|
|00005fd0| 73 20 61 20 73 75 62 63 | 6c 61 73 73 20 74 6f 20 |s a subc|lass to |
|00005fe0| 43 53 69 67 6e 65 64 4f | 62 6a 65 63 74 2e 00 a1 |CSignedO|bject...|
|00005ff0| 00 64 00 10 4f 4e 4c 4e | 00 64 03 09 01 25 00 54 |.d..ONLN|.d...%.T|
|00006000| 01 33 00 ea 00 28 01 4e | 00 72 18 44 65 6d 6f 53 |.3...(.N|.r.DemoS|
|00006010| 69 67 6e 65 64 4f 62 6a | 65 63 74 44 69 61 6c 6f |ignedObj|ectDialo|
|00006020| 67 2e 63 00 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |g.c....d|..ONLN.d|
|00006030| 03 22 01 25 00 f0 01 33 | 01 d8 00 29 9c 26 54 68 |.".%...3|...).&Th|
|00006040| 69 73 20 64 69 61 6c 6f | 67 20 6d 61 6e 61 67 65 |is dialo|g manage|
|00006050| 73 20 61 20 44 65 6d 6f | 53 69 67 6e 65 64 4f 62 |s a Demo|SignedOb|
|00006060| 6a 65 63 74 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |ject...d|..ONLN.d|
|00006070| 03 49 01 33 00 f0 01 41 | 01 d0 00 2a 0e 2c 69 6e |.I.3...A|...*.,in|
|00006080| 73 74 61 6e 63 65 2e 20 | 49 74 20 64 69 73 70 6c |stance. |It displ|
|00006090| 61 79 73 20 61 20 64 69 | 61 6c 6f 67 20 74 68 61 |ays a di|alog tha|
|000060a0| 74 20 6c 65 74 73 20 79 | 6f 75 00 a1 00 64 00 10 |t lets y|ou...d..|
|000060b0| 4f 4e 4c 4e 00 64 03 76 | 01 41 00 f0 01 4f 01 e8 |ONLN.d.v|.A...O..|
|000060c0| 00 2a 0e 2c 63 68 61 6e | 67 65 20 63 68 65 63 6b |.*.,chan|ge check|
|000060d0| 62 6f 78 20 61 6e 64 20 | 74 65 78 74 20 69 74 65 |box and |text ite|
|000060e0| 6d 73 2c 20 61 6e 64 20 | 63 6f 6e 74 72 6f 6c 73 |ms, and |controls|
|000060f0| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 03 a3 01 4f |...d..ON|LN.d...O|
|00006100| 00 f0 01 5d 01 e1 00 2a | 0e 2b 73 69 67 6e 69 6e |...]...*|.+signin|
|00006110| 67 2c 20 76 65 72 69 66 | 79 69 6e 67 2c 20 61 6e |g, verif|ying, an|
|00006120| 64 20 6f 74 68 65 72 20 | 43 53 69 67 6e 65 64 4f |d other |CSignedO|
|00006130| 62 6a 65 63 74 00 00 a1 | 00 64 00 10 4f 4e 4c 4e |bject...|.d..ONLN|
|00006140| 00 64 03 cf 01 5d 00 f0 | 01 6b 01 e2 00 2a 0e 2d |.d...]..|.k...*.-|
|00006150| 66 75 6e 63 74 69 6f 6e | 73 2e 20 49 74 20 69 73 |function|s. It is|
|00006160| 20 61 20 73 75 62 63 6c | 61 73 73 20 74 6f 20 43 | a subcl|ass to C|
|00006170| 44 4c 4f 47 44 69 72 65 | 63 74 6f 72 2e 00 00 a1 |DLOGDire|ctor....|
|00006180| 00 64 00 10 4f 4e 4c 4e | 00 64 03 fd 01 6b 00 f0 |.d..ONLN|.d...k..|
|00006190| 01 79 01 db 00 2a 0e 2a | 41 6c 74 68 6f 75 67 68 |.y...*.*|Although|
|000061a0| 20 69 74 20 61 70 70 65 | 61 72 73 20 74 6f 20 74 | it appe|ars to t|
|000061b0| 68 65 20 75 73 65 72 20 | 61 73 20 61 20 6d 6f 64 |he user |as a mod|
|000061c0| 61 6c 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 04 28 |al...d..|ONLN.d.(|
|000061d0| 01 79 00 f0 01 87 01 c0 | 00 2a 0e 27 64 69 61 6c |.y......|.*.'dial|
|000061e0| 6f 67 2c 20 69 74 20 69 | 73 20 61 63 74 75 61 6c |og, it i|s actual|
|000061f0| 6c 79 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 61 |ly imple|mented a|
|00006200| 73 20 61 00 00 a1 00 64 | 00 10 4f 4e 4c 4e 00 64 |s a....d|..ONLN.d|
|00006210| 04 50 01 87 00 f0 01 95 | 01 4e 00 2a 0e 0e 6e 6f |.P......|.N.*..no|
|00006220| 72 6d 61 6c 20 77 69 6e | 64 6f 77 2e 00 a1 00 64 |rmal win|dow....d|
|00006230| 00 10 4f 4e 4c 4e 00 64 | 04 5f 01 95 00 54 01 a3 |..ONLN.d|._...T..|
|00006240| 00 a7 00 28 01 be 00 72 | 0e 45 72 72 6f 72 4d 65 |...(...r|.ErrorMe|
|00006250| 73 73 61 67 65 2e 63 00 | 00 a1 00 64 00 10 4f 4e |ssage.c.|...d..ON|
|00006260| 4c 4e 00 64 04 6e 01 95 | 00 f0 01 a3 01 bb 00 29 |LN.d.n..|.......)|
|00006270| 9c 25 54 68 69 73 20 66 | 69 6c 65 20 63 6f 6e 74 |.%This f|ile cont|
|00006280| 61 69 6e 73 20 74 77 6f | 20 73 69 6d 70 6c 65 20 |ains two| simple |
|00006290| 64 69 73 70 6c 61 79 00 | 00 a1 00 64 00 10 4f 4e |display.|...d..ON|
|000062a0| 4c 4e 00 64 04 94 01 a3 | 00 f0 01 b1 01 e1 00 2a |LN.d....|.......*|
|000062b0| 0e 2a 66 75 6e 63 74 69 | 6f 6e 73 20 66 6f 72 20 |.*functi|ons for |
|000062c0| 64 65 62 75 67 67 69 6e | 67 20 63 6f 6e 76 65 6e |debuggin|g conven|
|000062d0| 69 65 6e 63 65 2e 20 45 | 72 72 6f 72 00 a1 00 64 |ience. E|rror...d|
|000062e0| 00 10 4f 4e 4c 4e 00 64 | 04 bf 01 b1 00 f0 01 bf |..ONLN.d|........|
|000062f0| 01 e6 00 2a 0e 29 6d 65 | 73 73 61 67 65 73 20 77 |...*.)me|ssages w|
|00006300| 65 72 65 20 69 6e 63 6c | 75 64 65 64 20 77 69 74 |ere incl|uded wit|
|00006310| 68 69 6e 20 74 68 65 20 | 70 72 6f 67 72 61 6d 00 |hin the |program.|
|00006320| 00 a1 00 64 00 10 4f 4e | 4c 4e 00 64 04 e9 01 bf |...d..ON|LN.d....|
|00006330| 00 f0 01 cd 01 e8 00 2a | 0e 2f 74 65 78 74 20 73 |.......*|./text s|
|00006340| 6f 20 74 68 65 72 65 20 | 77 61 73 20 61 20 73 69 |o there |was a si|
|00006350| 6e 67 6c 65 20 72 65 66 | 65 72 65 6e 63 65 20 70 |ngle ref|erence p|
|00006360| 6f 69 6e 74 20 74 68 61 | 74 00 00 a1 00 64 00 10 |oint tha|t....d..|
|00006370| 4f 4e 4c 4e 00 64 05 19 | 01 cd 00 f0 01 db 01 c6 |ONLN.d..|........|
|00006380| 00 2a 0e 25 65 78 70 6c | 61 69 6e 73 20 65 72 72 |.*.%expl|ains err|
|00006390| 6f 72 73 2e 20 41 20 70 | 72 6f 64 75 63 74 69 6f |ors. A p|roductio|
|000063a0| 6e 20 70 72 6f 67 72 61 | 6d 00 00 a1 00 64 00 10 |n progra|m....d..|
|000063b0| 4f 4e 4c 4e 00 64 05 3f | 01 db 00 f0 01 e9 01 e3 |ONLN.d.?|........|
|000063c0| 00 2a 0e 2d 73 68 6f 75 | 6c 64 20 70 72 65 66 65 |.*.-shou|ld prefe|
|000063d0| 72 61 62 6c 79 20 73 74 | 6f 72 65 20 69 74 73 20 |rably st|ore its |
|000063e0| 65 72 72 6f 72 20 6d 65 | 73 73 61 67 65 73 20 69 |error me|ssages i|
|000063f0| 6e 00 00 a1 00 64 00 10 | 4f 4e 4c 4e 00 64 05 6d |n....d..|ONLN.d.m|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.